diff --git a/.github/workflows/chart/pull-request-helm.yml b/.github/workflows/chart/pull-request-helm.yml new file mode 100644 index 0000000..65ca69a --- /dev/null +++ b/.github/workflows/chart/pull-request-helm.yml @@ -0,0 +1,53 @@ +name: pull-request-validation + +on: + pull_request: + branches: + - main + - feature/pr-action + +jobs: + build_lint_validate_diff: + name: lint, validate and diff from main + permissions: write-all + runs-on: ubuntu-latest + container: + image: alpine/helm:3.14.3 + steps: + - name: checkout pr head + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: install chart dependencies + run: helm dependency build charts/readur + + - name: lint helm chart + run: helm lint charts/readur --set persistence.data.existingClaim=test-pvc + + - name: prepare + run: mkdir -p charts/readur/build + - name: create full manifest from pr head + run: helm template readur charts/readur --set persistence.data.existingClaim=test-pvc > charts/readur/build/manifest.yaml + + - name: checkout main + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: main + path: main + + - name: install chart dependencies + run: helm dependency build main/charts/readur + + - name: prepare + run: mkdir -p main/charts/readur/build + - name: create full manifest from main + run: helm template readur main/charts/readur --set persistence.data.existingClaim=test-pvc > main/charts/readur/build/manifest.yaml + + - name: create diff comment + uses: int128/diff-action@v1 + with: + base: main/charts/readur/build + head: charts/readur/build + comment-header: "## Changes in Final Manifest" diff --git a/.github/workflows/chart/release-helm.yml b/.github/workflows/chart/release-helm.yml new file mode 100644 index 0000000..13bcd71 --- /dev/null +++ b/.github/workflows/chart/release-helm.yml @@ -0,0 +1,26 @@ +name: release + +on: + push: + tags: + - "chart-v*" + +jobs: + release: + permissions: write-all + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: configure git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: run chart-releaser + uses: helm/chart-releaser-action@v1.5.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker/docker-build.yml similarity index 100% rename from .github/workflows/docker-build.yml rename to .github/workflows/docker/docker-build.yml diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/tests/e2e-tests.yml similarity index 100% rename from .github/workflows/e2e-tests.yml rename to .github/workflows/tests/e2e-tests.yml diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/tests/test-e2e.yml similarity index 100% rename from .github/workflows/test-e2e.yml rename to .github/workflows/tests/test-e2e.yml diff --git a/.github/workflows/test-integration.yml b/.github/workflows/tests/test-integration.yml similarity index 100% rename from .github/workflows/test-integration.yml rename to .github/workflows/tests/test-integration.yml diff --git a/.github/workflows/test-unit.yml b/.github/workflows/tests/test-unit.yml similarity index 100% rename from .github/workflows/test-unit.yml rename to .github/workflows/tests/test-unit.yml