Skip to content

Commit 5642976

Browse files
committed
Fix component signing
1 parent fd61703 commit 5642976

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181

8282
- name: Publish `:<version>` to GitHub Container Registry
8383
if: github.event_name != 'workflow_dispatch'
84-
id: publish
84+
id: publish_versioned
8585
uses: bytecodealliance/wkg-github-action@v5
8686
with:
8787
file: target/wasm32-wasip1/release/${{ env.COMPONENT_NAME_UNDERSCORED }}
@@ -92,9 +92,13 @@ jobs:
9292
homepage: ${{ env.COMPONENT_HOMEPAGE }}
9393
licenses: ${{ env.COMPONENT_LICENSES }}
9494

95+
- name: Sign the versioned wasm component
96+
if: github.event_name != 'workflow_dispatch'
97+
run: cosign sign --yes ghcr.io/${{ env.IMAGE_NAME }}/${{ env.COMPONENT_NAME }}@${{ steps.publish_versioned.outputs.digest }}
98+
9599
- name: Publish `:latest` release to GitHub Container Registry
96100
if: github.event_name != 'workflow_dispatch'
97-
id: publish
101+
id: publish_latest
98102
uses: bytecodealliance/wkg-github-action@v5
99103
with:
100104
file: target/wasm32-wasip1/release/${{ env.COMPONENT_NAME_UNDERSCORED }}
@@ -105,6 +109,7 @@ jobs:
105109
homepage: ${{ env.COMPONENT_HOMEPAGE }}
106110
licenses: ${{ env.COMPONENT_LICENSES }}
107111

108-
- name: Sign the wasm component
112+
- name: Sign the latest wasm component
109113
if: github.event_name != 'workflow_dispatch'
110-
run: cosign sign --yes ghcr.io/${{ env.IMAGE_NAME }}/${{ env.COMPONENT_NAME }}@${{ steps.publish.outputs.digest }}
114+
run: cosign sign --yes ghcr.io/${{ env.IMAGE_NAME }}/${{ env.COMPONENT_NAME }}@${{ steps.publish_latest.outputs.digest }}
115+

0 commit comments

Comments
 (0)