Skip to content

Commit 5883e38

Browse files
committed
feat: keyless signing
1 parent 96034c5 commit 5883e38

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
username: ${{ github.actor }}
3131
password: ${{ secrets.GITHUB_TOKEN }}
3232

33+
- name: Install cosign
34+
uses: sigstore/[email protected]
35+
3336
- name: Cache cargo bin
3437
id: cache-cargo
3538
uses: actions/cache@v3
@@ -51,5 +54,17 @@ jobs:
5154
- name: Run build script
5255
run: bash scripts/build.sh
5356

54-
- name: Run publish script
55-
run: bash scripts/publish.sh ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
57+
# - name: Run publish script
58+
# run: bash scripts/publish.sh ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
59+
60+
# using my version until the PR is merged upstream
61+
# https://github.com/bytecodealliance/wkg-github-action/pull/7
62+
- name: Publish to GitHub Container Registry
63+
uses: duffney/wkg-github-action@9680cbd1dd38119bbc519c6c3e0b7fffe0b4982c
64+
with:
65+
file: target/wasm32-wasi/release/rust_wasi_hello.wasm
66+
oci-reference-without-tag: ghcr.io/${{ github.actor }}/rust-wasi-hello
67+
version: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
68+
69+
- name: Sign the wasm component
70+
run: cosign sign --yes ghcr.io/${{ github.actor }}/rust-wasi-hello@${{ steps.publish.outputs.digest }}

0 commit comments

Comments
 (0)