Skip to content

Commit 8f3e9ec

Browse files
authored
Merge pull request #45 from Finoptimize/pre-production-cleanup
Fix: Cosign image signing reference to include component tag
2 parents 91cc6b0 + af9f30f commit 8f3e9ec

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)