|
19 | 19 | uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 |
20 | 20 | with: |
21 | 21 | path: postgres-containers |
| 22 | + token: ${{ secrets.REPO_GHA_PAT }} |
22 | 23 |
|
23 | 24 | - name: Checkout artifacts |
24 | 25 | uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 |
|
41 | 42 | run: | |
42 | 43 | python postgres-containers/.github/catalogs_generator.py --output-dir artifacts/image-catalogs/ |
43 | 44 |
|
| 45 | + # TODO: remove this step once system images are EOL |
| 46 | + - name: Update legacy catalogs |
| 47 | + run: | |
| 48 | + cp artifacts/image-catalogs/catalog-system-bullseye.yaml postgres-containers/Debian/ClusterImageCatalog-bullseye.yaml |
| 49 | + cp artifacts/image-catalogs/catalog-system-bookworm.yaml postgres-containers/Debian/ClusterImageCatalog-bookworm.yaml |
| 50 | + yq -i '.metadata.name = "postgresql"' postgres-containers/Debian/ClusterImageCatalog-bullseye.yaml |
| 51 | + yq -i '.metadata.name = "postgresql"' postgres-containers/Debian/ClusterImageCatalog-bookworm.yaml |
| 52 | +
|
44 | 53 | - name: Diff |
45 | 54 | working-directory: artifacts |
46 | 55 | run: | |
|
56 | 65 | author_name: CloudNativePG Automated Updates |
57 | 66 | author_email: noreply@cnpg.com |
58 | 67 | message: 'chore: update imageCatalogs' |
| 68 | + |
| 69 | + # TODO: remove this step once system images are EOL |
| 70 | + - name: Temporarily disable "include administrators" branch protection |
| 71 | + if: ${{ always() && github.ref == 'refs/heads/main' }} |
| 72 | + id: disable_include_admins |
| 73 | + uses: benjefferies/branch-protection-bot@af281f37de86139d1c7a27b91176b5dc1c2c827c # v1.1.2 |
| 74 | + with: |
| 75 | + access_token: ${{ secrets.REPO_GHA_PAT }} |
| 76 | + branch: main |
| 77 | + enforce_admins: false |
| 78 | + |
| 79 | + # TODO: remove this step once system images are EOL |
| 80 | + - uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9 |
| 81 | + if: ${{ github.ref == 'refs/heads/main' }} |
| 82 | + with: |
| 83 | + cwd: 'postgres-containers' |
| 84 | + add: 'Debian/*.yaml' |
| 85 | + author_name: CloudNativePG Automated Updates |
| 86 | + author_email: noreply@cnpg.com |
| 87 | + message: 'chore: update imageCatalogs' |
| 88 | + |
| 89 | + # TODO: remove this step once system images are EOL |
| 90 | + - name: Enable "include administrators" branch protection |
| 91 | + uses: benjefferies/branch-protection-bot@af281f37de86139d1c7a27b91176b5dc1c2c827c # v1.1.2 |
| 92 | + if: ${{ always() && github.ref == 'refs/heads/main' }} |
| 93 | + with: |
| 94 | + access_token: ${{ secrets.REPO_GHA_PAT }} |
| 95 | + branch: main |
| 96 | + enforce_admins: ${{ steps.disable_include_admins.outputs.initial_status }} |
0 commit comments