update-catalogs #7
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
| name: Update Extension Image Catalogs | |
| on: | |
| schedule: | |
| # Refresh Catalogs once a week, on Mondays - 1h after postgres-container images | |
| - cron: 0 9 * * 1 | |
| workflow_dispatch: | |
| repository_dispatch: | |
| types: [update-catalogs] | |
| permissions: read-all | |
| defaults: | |
| run: | |
| shell: "bash -Eeuo pipefail -x {0}" | |
| jobs: | |
| update-catalogs: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| persist-credentials: false | |
| - name: Checkout artifacts | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| path: artifacts | |
| repository: cloudnative-pg/artifacts | |
| token: ${{ secrets.REPO_GHA_PAT }} | |
| ref: main | |
| - name: Update catalogs | |
| id: update-extension-catalogs | |
| uses: dagger/dagger-for-github@d913e70051faf3b907d4dd96ef1161083c88c644 # v8.2.0 | |
| env: | |
| # renovate: datasource=github-tags depName=dagger/dagger versioning=semver | |
| DAGGER_VERSION: 0.19.10 | |
| with: | |
| version: ${{ env.DAGGER_VERSION }} | |
| verb: call | |
| module: ./dagger/maintenance/ | |
| args: generate-catalogs --catalogs-dir artifacts/image-catalogs/ export --path artifacts/image-catalogs/ | |
| - name: Diff | |
| working-directory: artifacts | |
| run: | | |
| git add -A . | |
| git status | |
| git diff --staged | |
| - uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9 | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| cwd: 'artifacts' | |
| add: 'image-catalogs' | |
| author_name: CloudNativePG Automated Updates | |
| author_email: noreply@cnpg.com | |
| message: 'chore: update extensions imageCatalogs' |