Skip to content

Commit 8331bbb

Browse files
committed
ci: sign catalog YAML files
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
1 parent f7e788b commit 8331bbb

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/catalogs.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ defaults:
1313

1414
jobs:
1515
update-catalogs:
16+
name: Updating catalogs
1617
runs-on: ubuntu-24.04
18+
permissions:
19+
id-token: write
1720
steps:
1821
# TODO: remove this step once system images are EOL
1922
- name: Checkout code
@@ -48,6 +51,22 @@ jobs:
4851
yq -i '.metadata.name = "postgresql"' postgres-containers/Debian/ClusterImageCatalog-bullseye.yaml
4952
yq -i '.metadata.name = "postgresql"' postgres-containers/Debian/ClusterImageCatalog-bookworm.yaml
5053
54+
- name: Install cosign
55+
uses: sigstore/cosign-installer@398d4b0eeef1380460a10c8013a76f728fb906ac # v3
56+
57+
- name: Sign catalogs
58+
run: |
59+
for file in artifacts/image-catalogs/*.yaml; do
60+
echo "Signing $file..."
61+
cosign sign-blob "$file" --bundle "$file.sigstore.json" --yes
62+
done
63+
64+
# TODO: remove this once system images are EOL
65+
for file in postgres-containers/Debian/*.yaml; do
66+
echo "Signing $file..."
67+
cosign sign-blob "$file" --bundle "$file.sigstore.json" --yes
68+
done
69+
5170
- name: Diff
5271
working-directory: artifacts
5372
run: |
@@ -87,7 +106,7 @@ jobs:
87106
if: ${{ github.ref == 'refs/heads/main' }}
88107
with:
89108
cwd: 'postgres-containers'
90-
add: 'Debian/*.yaml'
109+
add: 'Debian'
91110
author_name: CloudNativePG Automated Updates
92111
author_email: noreply@cnpg.com
93112
message: 'chore: update imageCatalogs'

0 commit comments

Comments
 (0)