mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 10:32:57 +01:00
ci: keep nightly signing off the registries
GHCR has no OCI referrers API, so every pushed signature or attestation lands under a new sha256-<digest> tag, which piles up with a nightly. Nightly now only records the provenance attestation in GitHub's API, which still exercises the OIDC and attestation path every day. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -312,6 +312,8 @@ jobs:
|
||||
push_variant /tmp/digests/full "$FULL_METADATA" digest-full
|
||||
|
||||
# Its own job so a signing failure can't skip `scan` of an already published image.
|
||||
# Nightly writes nothing to the registries: GHCR has no referrers API, so each
|
||||
# signature would add a `sha256-<digest>` tag.
|
||||
sign:
|
||||
needs: merge
|
||||
strategy:
|
||||
@@ -329,12 +331,14 @@ jobs:
|
||||
artifact-metadata: write
|
||||
steps:
|
||||
- name: Login to Docker Hub
|
||||
if: env.CHANNEL == 'release'
|
||||
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
if: env.CHANNEL == 'release'
|
||||
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -342,10 +346,12 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Install cosign
|
||||
if: env.CHANNEL == 'release'
|
||||
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
|
||||
|
||||
# Both registries, since a signature is stored next to the image it covers.
|
||||
- name: Sign image
|
||||
if: env.CHANNEL == 'release'
|
||||
env:
|
||||
DIGEST: ${{ needs.merge.outputs[format('digest-{0}', matrix.variant)] }}
|
||||
run: |
|
||||
@@ -360,7 +366,7 @@ jobs:
|
||||
with:
|
||||
subject-name: ${{ env.DIGEST_IMAGE }}
|
||||
subject-digest: ${{ needs.merge.outputs[format('digest-{0}', matrix.variant)] }}
|
||||
push-to-registry: true
|
||||
push-to-registry: ${{ env.CHANNEL == 'release' }}
|
||||
|
||||
# Records what shipped; image-scan.yml's weekly run rescans latest.
|
||||
scan:
|
||||
|
||||
Reference in New Issue
Block a user