forked from repo-mirrors/cnpg-postgres-containers
feat: generate image catalogs for bake images (#305)
Generate default cluster image catalogs for all combinations of types and OS versions, including all supported PostgreSQL versions. The catalogs also include predefined labels to easily identify the type, OS version, date, and origin of the catalog. Closes cloudnative-pg/artifacts#1 Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com> Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
12
.github/workflows/bake.yml
vendored
12
.github/workflows/bake.yml
vendored
@@ -51,3 +51,15 @@ jobs:
|
||||
with:
|
||||
environment: ${{ github.event.inputs.environment }}
|
||||
postgresql_version: ${{ matrix.version }}
|
||||
|
||||
Catalogs:
|
||||
name: Update Catalogs
|
||||
needs: Bake
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Repository Dispatch
|
||||
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3
|
||||
with:
|
||||
event-type: update-catalogs
|
||||
|
57
.github/workflows/catalogs.yml
vendored
Normal file
57
.github/workflows/catalogs.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Update Catalogs
|
||||
|
||||
on:
|
||||
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 code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||
with:
|
||||
path: postgres-containers
|
||||
|
||||
- name: Checkout artifacts
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||
with:
|
||||
path: artifacts
|
||||
repository: cloudnative-pg/artifacts
|
||||
token: ${{ secrets.REPO_GHA_PAT }}
|
||||
ref: main
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
|
||||
with:
|
||||
python-version: 3.13
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
pip install packaging==25.0 PyYAML==6.0.2
|
||||
|
||||
- name: Generate catalogs
|
||||
run: |
|
||||
python postgres-containers/.github/catalogs_generator.py --output-dir artifacts/image-catalogs/
|
||||
|
||||
- name: Diff
|
||||
working-directory: artifacts
|
||||
run: |
|
||||
git status
|
||||
git diff
|
||||
|
||||
- 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 imageCatalogs'
|
Reference in New Issue
Block a user