mirror of
https://github.com/CloudNebulaProject/barycenter.git
synced 2026-04-10 21:20:41 +00:00
fix: move attestation to multi-platform manifest creation
This commit is contained in:
parent
6e0fb3cb68
commit
656bdb5531
1 changed files with 14 additions and 7 deletions
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
|
|
@ -70,19 +70,13 @@ jobs:
|
||||||
VERSION=${{ github.ref_name }}
|
VERSION=${{ github.ref_name }}
|
||||||
REVISION=${{ github.sha }}
|
REVISION=${{ github.sha }}
|
||||||
|
|
||||||
- name: Generate artifact attestation
|
|
||||||
uses: actions/attest-build-provenance@v1
|
|
||||||
with:
|
|
||||||
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
||||||
subject-digest: ${{ steps.build.outputs.digest }}
|
|
||||||
push-to-registry: true
|
|
||||||
|
|
||||||
create-manifest:
|
create-manifest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-platform
|
needs: build-platform
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Log in to GitHub Container Registry
|
- name: Log in to GitHub Container Registry
|
||||||
|
|
@ -104,6 +98,7 @@ jobs:
|
||||||
type=sha,prefix=sha-
|
type=sha,prefix=sha-
|
||||||
|
|
||||||
- name: Create and push multi-platform manifest
|
- name: Create and push multi-platform manifest
|
||||||
|
id: manifest
|
||||||
run: |
|
run: |
|
||||||
# Extract tags into an array
|
# Extract tags into an array
|
||||||
TAGS=$(echo '${{ steps.meta.outputs.tags }}' | tr '\n' ' ')
|
TAGS=$(echo '${{ steps.meta.outputs.tags }}' | tr '\n' ' ')
|
||||||
|
|
@ -116,6 +111,18 @@ jobs:
|
||||||
${TAG}-arm64
|
${TAG}-arm64
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Get the digest of the first tag (version tag) for attestation
|
||||||
|
FIRST_TAG=$(echo '${{ steps.meta.outputs.tags }}' | head -n1)
|
||||||
|
DIGEST=$(docker buildx imagetools inspect ${FIRST_TAG} --format '{{.Manifest.Digest}}')
|
||||||
|
echo "digest=${DIGEST}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Generate artifact attestation
|
||||||
|
uses: actions/attest-build-provenance@v1
|
||||||
|
with:
|
||||||
|
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
subject-digest: ${{ steps.manifest.outputs.digest }}
|
||||||
|
push-to-registry: true
|
||||||
|
|
||||||
create-github-release:
|
create-github-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: create-manifest
|
needs: create-manifest
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue