Skip to content

Commit 8fb03ff

Browse files
authored
feat(releases): exclude latest tag (#1753)
Signed-off-by: Jose I. Paris <[email protected]>
1 parent 5072600 commit 8fb03ff

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/build_and_package.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,13 @@ jobs:
103103
# goreleaser output resides in dist/artifacts.json
104104
# Attest all built containers and manifests
105105
images=$(cat dist/artifacts.json | jq -r '.[] | select(.type=="Docker Image" or .type=="Docker Manifest") | .path')
106-
for entry in $images; do
107-
syft -o cyclonedx-json=/tmp/sbom.cyclonedx.json $entry
108-
chainloop attestation add --value $entry --kind CONTAINER_IMAGE --attestation-id ${{ env.ATTESTATION_ID }}
109-
chainloop attestation add --value /tmp/sbom.cyclonedx.json --attestation-id ${{ env.ATTESTATION_ID }}
106+
for entry in $images; do
107+
# exclude latest tag
108+
if [[ $entry != *latest ]]; then
109+
syft -o cyclonedx-json=/tmp/sbom.cyclonedx.json $entry
110+
chainloop attestation add --value $entry --kind CONTAINER_IMAGE --attestation-id ${{ env.ATTESTATION_ID }}
111+
chainloop attestation add --value /tmp/sbom.cyclonedx.json --attestation-id ${{ env.ATTESTATION_ID }}
112+
fi
110113
done
111114
112115
- name: Bump Chart and Dagger Version

0 commit comments

Comments
 (0)