Skip to content

Commit af9f30f

Browse files
committed
Fix: Cosign image signing reference to include component tag
1 parent 41fd66c commit af9f30f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/container.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,11 @@ jobs:
147147
COSIGN_EXPERIMENTAL: "true"
148148
run: |
149149
echo "Signing image with Cosign..."
150+
# Extract the first tag from the metadata output
151+
IMAGE_TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n1)
152+
echo "Signing image: ${IMAGE_TAG}@${{ steps.build-push.outputs.digest }}"
150153
cosign sign --yes \
151-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-push.outputs.digest }}
154+
"${IMAGE_TAG}@${{ steps.build-push.outputs.digest }}"
152155
153156
- name: Run Trivy container scan
154157
uses: aquasecurity/trivy-action@master

0 commit comments

Comments
 (0)