Skip to content

Publish a :latest tag #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -79,9 +79,9 @@ jobs:
- name: Normalize COMPONENT_NAME and Append .wasm
run: echo "COMPONENT_NAME_UNDERSCORED=${COMPONENT_NAME//-/_}.wasm" >> $GITHUB_ENV

- name: Publish to GitHub Container Registry
- name: Publish `:<version>` to GitHub Container Registry
if: github.event_name != 'workflow_dispatch'
id: publish
id: publish_versioned
uses: bytecodealliance/wkg-github-action@v5
with:
file: target/wasm32-wasip1/release/${{ env.COMPONENT_NAME_UNDERSCORED }}
@@ -92,6 +92,24 @@ jobs:
homepage: ${{ env.COMPONENT_HOMEPAGE }}
licenses: ${{ env.COMPONENT_LICENSES }}

- name: Sign the wasm component
- name: Sign the versioned wasm component
if: github.event_name != 'workflow_dispatch'
run: cosign sign --yes ghcr.io/${{ env.IMAGE_NAME }}/${{ env.COMPONENT_NAME }}@${{ steps.publish.outputs.digest }}
run: cosign sign --yes ghcr.io/${{ env.IMAGE_NAME }}/${{ env.COMPONENT_NAME }}@${{ steps.publish_versioned.outputs.digest }}

- name: Publish `:latest` release to GitHub Container Registry
if: github.event_name != 'workflow_dispatch'
id: publish_latest
uses: bytecodealliance/wkg-github-action@v5
with:
file: target/wasm32-wasip1/release/${{ env.COMPONENT_NAME_UNDERSCORED }}
oci-reference-without-tag: ghcr.io/${{ env.IMAGE_NAME }}/${{ env.COMPONENT_NAME }}
version: latest
description: ${{ env.COMPONENT_DESCRIPTION }}
source: ${{ env.COMPONENT_SOURCE }}
homepage: ${{ env.COMPONENT_HOMEPAGE }}
licenses: ${{ env.COMPONENT_LICENSES }}

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