Fix SBOM for docker image
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
45
.github/workflows/release.yaml
vendored
45
.github/workflows/release.yaml
vendored
@@ -98,51 +98,10 @@ jobs:
|
|||||||
- name: Get image digest
|
- name: Get image digest
|
||||||
id: image
|
id: image
|
||||||
run: |
|
run: |
|
||||||
# Wait for the multi-platform manifest to be available
|
echo "Getting image digest..."
|
||||||
echo "Waiting for multi-platform manifest to be available..."
|
DIGEST=$(docker buildx imagetools inspect ghcr.io/getprobo/probo:${{ github.ref_name }} --format '{{.Manifest.Digest}}')
|
||||||
for i in {1..30}; do
|
|
||||||
echo "Attempt $i/30: Checking if image is available..."
|
|
||||||
|
|
||||||
# Try to get the digest from the registry
|
|
||||||
DIGEST=$(docker buildx imagetools inspect ghcr.io/getprobo/probo:${{ github.ref_name }} --format '{{.Descriptor.Digest}}' 2>/dev/null || echo "")
|
|
||||||
|
|
||||||
if [ -n "$DIGEST" ]; then
|
|
||||||
echo "Successfully retrieved digest: $DIGEST"
|
echo "Successfully retrieved digest: $DIGEST"
|
||||||
echo "digest=$DIGEST" >> "$GITHUB_OUTPUT"
|
echo "digest=$DIGEST" >> "$GITHUB_OUTPUT"
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Image not available yet, waiting 10 seconds..."
|
|
||||||
sleep 10
|
|
||||||
done
|
|
||||||
|
|
||||||
# If we get here, the primary method failed, try alternative approaches
|
|
||||||
echo "Primary method failed, trying alternative methods..."
|
|
||||||
|
|
||||||
# Try inspecting the latest tag
|
|
||||||
echo "Trying latest tag..."
|
|
||||||
DIGEST=$(docker buildx imagetools inspect ghcr.io/getprobo/probo:latest --format '{{.Descriptor.Digest}}' 2>/dev/null || echo "")
|
|
||||||
|
|
||||||
if [ -n "$DIGEST" ]; then
|
|
||||||
echo "Successfully retrieved digest from latest tag: $DIGEST"
|
|
||||||
echo "digest=$DIGEST" >> "$GITHUB_OUTPUT"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Try getting digest from individual architecture images
|
|
||||||
echo "Trying to get digest from amd64 image..."
|
|
||||||
DIGEST_AMD64=$(docker buildx imagetools inspect ghcr.io/getprobo/probo:${{ github.ref_name }}-amd64 --format '{{.Descriptor.Digest}}' 2>/dev/null || echo "")
|
|
||||||
|
|
||||||
if [ -n "$DIGEST_AMD64" ]; then
|
|
||||||
echo "Using amd64 image digest: $DIGEST_AMD64"
|
|
||||||
echo "digest=$DIGEST_AMD64" >> "$GITHUB_OUTPUT"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Error: Could not retrieve image digest from registry after all attempts"
|
|
||||||
echo "Available tags for debugging:"
|
|
||||||
docker buildx imagetools inspect ghcr.io/getprobo/probo --format '{{json .}}' 2>/dev/null || echo "Failed to inspect repository"
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
- name: Attest Docker image SBOM
|
- name: Attest Docker image SBOM
|
||||||
uses: actions/attest-sbom@v1
|
uses: actions/attest-sbom@v1
|
||||||
|
|||||||
@@ -88,10 +88,10 @@ signs:
|
|||||||
output: true
|
output: true
|
||||||
|
|
||||||
docker_manifests:
|
docker_manifests:
|
||||||
- name_template: "ghcr.io/getprobo/probo:{{ .Version }}"
|
- name_template: "ghcr.io/getprobo/probo:{{ .Tag }}"
|
||||||
image_templates:
|
image_templates:
|
||||||
- "ghcr.io/getprobo/probo:{{ .Version }}-amd64"
|
- "ghcr.io/getprobo/probo:{{ .Tag }}-amd64"
|
||||||
- "ghcr.io/getprobo/probo:{{ .Version }}-arm64"
|
- "ghcr.io/getprobo/probo:{{ .Tag }}-arm64"
|
||||||
skip_push: "{{ .IsSnapshot }}"
|
skip_push: "{{ .IsSnapshot }}"
|
||||||
- name_template: "ghcr.io/getprobo/probo:latest"
|
- name_template: "ghcr.io/getprobo/probo:latest"
|
||||||
image_templates:
|
image_templates:
|
||||||
@@ -123,7 +123,7 @@ docker_signs:
|
|||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
- image_templates:
|
- image_templates:
|
||||||
- "ghcr.io/getprobo/probo:{{ .Version }}-amd64"
|
- "ghcr.io/getprobo/probo:{{ .Tag }}-amd64"
|
||||||
- "ghcr.io/getprobo/probo:latest-amd64"
|
- "ghcr.io/getprobo/probo:latest-amd64"
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
use: buildx
|
use: buildx
|
||||||
@@ -144,7 +144,7 @@ dockers:
|
|||||||
goarch: amd64
|
goarch: amd64
|
||||||
skip_push: "{{ .IsSnapshot }}"
|
skip_push: "{{ .IsSnapshot }}"
|
||||||
- image_templates:
|
- image_templates:
|
||||||
- "ghcr.io/getprobo/probo:{{ .Version }}-arm64"
|
- "ghcr.io/getprobo/probo:{{ .Tag }}-arm64"
|
||||||
- "ghcr.io/getprobo/probo:latest-arm64"
|
- "ghcr.io/getprobo/probo:latest-arm64"
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
use: buildx
|
use: buildx
|
||||||
@@ -188,9 +188,9 @@ release:
|
|||||||
## Changes in {{ .Tag }}
|
## Changes in {{ .Tag }}
|
||||||
footer: |
|
footer: |
|
||||||
## Docker Images
|
## Docker Images
|
||||||
- `ghcr.io/getprobo/probo:{{ .Version }}` (multi-arch: linux/amd64, linux/arm64)
|
- `ghcr.io/getprobo/probo:{{ .Tag }}` (multi-arch: linux/amd64, linux/arm64)
|
||||||
- `ghcr.io/getprobo/probo:latest` (multi-arch: linux/amd64, linux/arm64)
|
- `ghcr.io/getprobo/probo:latest` (multi-arch: linux/amd64, linux/arm64)
|
||||||
|
|
||||||
### Architecture-specific images
|
### Architecture-specific images
|
||||||
- `ghcr.io/getprobo/probo:{{ .Version }}-amd64`
|
- `ghcr.io/getprobo/probo:{{ .Tag }}-amd64`
|
||||||
- `ghcr.io/getprobo/probo:{{ .Version }}-arm64`
|
- `ghcr.io/getprobo/probo:{{ .Tag }}-arm64`
|
||||||
|
|||||||
Reference in New Issue
Block a user