feat(container): update image ghcr.io/cloudnative-pg/charts/cloudnative-pg ( 0.26.1 ➔ 0.27.0 ) #43
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: "Pull Request: Validate" | |
| on: | |
| pull_request: | |
| branches: ["main"] | |
| paths: ["kubernetes/**"] | |
| concurrency: | |
| group: ${{ github.head_ref }}-pr-validate | |
| cancel-in-progress: true | |
| env: | |
| KUBERNETES_DIR: ./kubernetes | |
| jobs: | |
| kubeconform: | |
| name: Kubeconform | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Install arkade | |
| uses: alexellis/setup-arkade@b1816384b2260cfd2c023c6798d26075786cfc7f # v3 | |
| - name: Setup Workflow Tools | |
| run: arkade get kubeconform kustomize | |
| - name: Substitute placeholder | |
| uses: faradaytrs/substitute-secrets-action@26e9dfb248ba425dcb806a0f54e274ef7e8448f7 # 2.4 | |
| with: | |
| input: 'kubernetes/**/*.yaml' | |
| substitutionRegex: '\$\{(\w+)\}' | |
| substitutionData: '{"SECRET_DOMAIN":"placeholder.example"}' | |
| throwOnDataMissing: false | |
| - name: Run kubeconform | |
| shell: bash | |
| run: bash ./scripts/kubeconform.sh ${{ env.KUBERNETES_DIR }} | |
| flux-test: | |
| name: Flux Local - Test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Generate Token | |
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.BOT_APP_ID }} | |
| private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }} | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Substitute placeholder | |
| uses: faradaytrs/substitute-secrets-action@26e9dfb248ba425dcb806a0f54e274ef7e8448f7 # 2.4 | |
| with: | |
| input: 'kubernetes/**/*.yaml' | |
| substitutionRegex: '\$\{(\w+)\}' | |
| substitutionData: '{"S3URL":"https://placeholder.example"}' | |
| throwOnDataMissing: false | |
| - name: Run flux-local test | |
| uses: docker://ghcr.io/allenporter/flux-local:v8.0.1@sha256:5c8cb0ff9d26a5260a47e7b3949403d80713d80037b9f0e4c02c5efca3588518 | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| with: | |
| args: >- | |
| test | |
| --all-namespaces | |
| --api-versions=monitoring.coreos.com/v1 | |
| --enable-helm | |
| --path /github/workspace/kubernetes/flux/cluster | |
| - name: Undo any changes (if needed) | |
| run: | | |
| git checkout -- ./kubernetes | |
| flux-diff: | |
| name: Flux Diff | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| strategy: | |
| matrix: | |
| resource: | |
| - helmrelease | |
| - kustomization | |
| include: | |
| - resource: helmrelease | |
| extraArgs: "--api-versions=monitoring.coreos.com/v1" | |
| - resource: kustomization | |
| extraArgs: "" | |
| fail-fast: false | |
| steps: | |
| - name: Generate Token | |
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.BOT_APP_ID }} | |
| private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }} | |
| - name: Checkout Pull Request | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| path: pull | |
| persist-credentials: false | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Substitute placeholder | |
| uses: faradaytrs/substitute-secrets-action@26e9dfb248ba425dcb806a0f54e274ef7e8448f7 # 2.4 | |
| with: | |
| input: 'pull/kubernetes/apps/**/*.yaml' | |
| substitutionRegex: '\$\{(\w+)\}' | |
| substitutionData: '{"S3URL":"https://placeholder.example"}' | |
| throwOnDataMissing: false | |
| - name: Checkout Default Branch | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| ref: "${{ github.event.repository.default_branch }}" | |
| path: default | |
| persist-credentials: false | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Substitute placeholder | |
| uses: faradaytrs/substitute-secrets-action@26e9dfb248ba425dcb806a0f54e274ef7e8448f7 # 2.4 | |
| with: | |
| input: 'default/kubernetes/apps/**/*.yaml' | |
| substitutionRegex: '\$\{(\w+)\}' | |
| substitutionData: '{"S3URL":"https://placeholder.example"}' | |
| throwOnDataMissing: false | |
| - name: Run flux-local diff | |
| uses: docker://ghcr.io/allenporter/flux-local:v8.0.1@sha256:5c8cb0ff9d26a5260a47e7b3949403d80713d80037b9f0e4c02c5efca3588518 | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| with: | |
| args: > | |
| diff ${{ matrix.resource }} | |
| --unified 6 | |
| --path /github/workspace/pull/kubernetes/flux/cluster | |
| --path-orig /github/workspace/default/kubernetes/flux/cluster | |
| --strip-attrs "helm.sh/chart,checksum/config,checksum/redis,checksum/secrets,app.kubernetes.io/version,chart,app" | |
| --limit-bytes 10000 | |
| --all-namespaces | |
| --sources "flux-system" | |
| ${{ matrix.extraArgs }} | |
| --output-file diff.patch | |
| - name: Generate Diff | |
| id: diff | |
| run: |- | |
| echo 'diff<<EOF' >> $GITHUB_OUTPUT | |
| echo '```diff' >> $GITHUB_OUTPUT | |
| cat diff.patch >> $GITHUB_OUTPUT | |
| echo '```' >> $GITHUB_OUTPUT | |
| echo 'EOF' >> $GITHUB_OUTPUT | |
| - if: ${{ steps.diff.outputs.diff != '' }} | |
| name: Add Comment | |
| uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 | |
| with: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| header: ${{ github.event.pull_request.number }}/kubernetes/${{ matrix.resource }} | |
| message: ${{ steps.diff.outputs.diff }} | |
| automerge-and-approve: | |
| needs: | |
| - kubeconform | |
| - flux-diff | |
| - flux-test | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| name: Automerge and Approve build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate Token | |
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.BOT_APP_ID }} | |
| private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }} | |
| - name: automerge | |
| uses: pascalgn/automerge-action@7961b8b5eec56cc088c140b56d864285eabd3f67 # v0.16.4 | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| UPDATE_RETRIES: 12 | |
| UPDATE_RETRY_SLEEP: 60000 | |
| MERGE_METHOD: squash |