forked from repo-mirrors/cnpg-postgres-containers
feat: add reusable GitHub Action to generate ImageCatalogs (#323)
Introduces a composite action that wraps `catalogs_generator.py` to generate CloudNativePG ImageCatalog YAMLs from a container registry. Supports multiple image types, distributions, and custom family prefixes. Generates a `kustomization.yaml` for easy deployment of all catalogs. Related to cloudnative-pg/postgis-containers#100 Closes #324 Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com> Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
20
.github/workflows/catalogs.yml
vendored
20
.github/workflows/catalogs.yml
vendored
@@ -15,6 +15,7 @@ jobs:
|
||||
update-catalogs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
# TODO: remove this step once system images are EOL
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||
with:
|
||||
@@ -29,18 +30,15 @@ jobs:
|
||||
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/
|
||||
uses: ./postgres-containers/.github/actions/generate-catalogs
|
||||
with:
|
||||
output-dir: artifacts/image-catalogs/
|
||||
registry: ghcr.io/cloudnative-pg/postgresql
|
||||
family: postgresql
|
||||
distributions: bullseye,bookworm,trixie
|
||||
image-types: minimal,standard,system
|
||||
regex: '(\d+)(?:\.\d+|beta\d+|rc\d+|alpha\d+)-(\d{12})'
|
||||
|
||||
# TODO: remove this step once system images are EOL
|
||||
- name: Update legacy catalogs
|
||||
|
Reference in New Issue
Block a user