File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 66
66
- name : Set up Docker Buildx
67
67
uses : docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
68
68
69
+ - name : Set up Cosign
70
+ uses : sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
71
+
69
72
- name : Set image name
70
73
id : image-name
71
74
run : echo "value=ghcr.io/${{ github.repository }}" >> "$GITHUB_OUTPUT"
@@ -114,6 +117,18 @@ jobs:
114
117
outputs : ${{ steps.build-output.outputs.value }}
115
118
# push: ${{ inputs.publish }}
116
119
120
+ - name : Sign image with GitHub OIDC Token
121
+ if : inputs.publish
122
+ env :
123
+ DIGEST : ${{ steps.build.outputs.digest }}
124
+ TAGS : ${{ steps.meta.outputs.tags }}
125
+ run : |
126
+ images=""
127
+ for tag in ${TAGS}; do
128
+ images+="${tag}@${DIGEST} "
129
+ done
130
+ cosign sign --yes ${images}
131
+
117
132
- name : Set image ref
118
133
id : image-ref
119
134
run : echo "value=${{ steps.image-name.outputs.value }}@${{ steps.build.outputs.digest }}" >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments