Skip to content

wasi-demo-app@0.2.0

wasi-demo-app@0.2.0 #9

# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
name: Release wasi-demo-app
run-name: wasi-demo-app@${{ inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: "The version of the image to release. (e.g., 1.2.3)"
type: string
required: true
dry_run:
description: "Run the release without actually releasing bits"
type: boolean
default: true
env:
CARGO_TERM_COLOR: always
jobs:
release-wasi-demo:
permissions:
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup build env
run: ./scripts/setup-linux.sh
- name: Install Rust and wasm32-wasi target
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-wasi
override: true
- name: Build oci tarballs
run: |
make load
make load/oci
sudo ctr image ls
- name: Tagging images
run: |
sudo ctr image tag ghcr.io/containerd/runwasi/wasi-demo-app:latest ghcr.io/${{ github.repository }}/wasi-demo-app:${{ inputs.version }}
sudo ctr image tag ghcr.io/containerd/runwasi/wasi-demo-oci:latest ghcr.io/${{ github.repository }}/wasi-demo-app:latest
sudo ctr image tag ghcr.io/containerd/runwasi/wasi-demo-oci:latest ghcr.io/${{ github.repository }}/wasi-demo-oci:${{ inputs.version }}
sudo ctr image tag ghcr.io/containerd/runwasi/wasi-demo-oci:latest ghcr.io/${{ github.repository }}/wasi-demo-oci:latest
sudo ctr image tag ghcr.io/containerd/runwasi/wasi-demo-oci-artifact:latest ghcr.io/${{ github.repository }}/wasi-demo-oci-artifact:${{ inputs.version }}
sudo ctr image tag ghcr.io/containerd/runwasi/wasi-demo-oci-artifact:latest ghcr.io/${{ github.repository }}/wasi-demo-oci-artifact:latest
- name: Push images to ghcr.io
if: ${{ inputs.dry_run == false }}
run: |
sudo ctr images push --user ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/${{ github.repository }}/wasi-demo-app:${{ inputs.version }}
sudo ctr images push --user ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/${{ github.repository }}/wasi-demo-app:latest
sudo ctr images push --user ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/${{ github.repository }}/wasi-demo-oci:${{ inputs.version }}
sudo ctr images push --user ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/${{ github.repository }}/wasi-demo-oci:latest
sudo ctr images push --user ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/${{ github.repository }}/wasi-demo-oci-artifact:${{ inputs.version }}
sudo ctr images push --user ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} ghcr.io/${{ github.repository }}/wasi-demo-oci-artifact:latest
sign-wasi-demo-app:
if: ${{ inputs.dry_run == false }}
needs:
- release-wasi-demo
uses: ./.github/workflows/sign.yml
with:
image-name: "wasi-demo-app"
version: ${{ inputs.version }}
sbom-wasi-demo-app:
if: ${{ inputs.dry_run == false }}
needs:
- release-wasi-demo
uses: ./.github/workflows/sbom.yml
with:
image-name: "wasi-demo-app"
version: ${{ inputs.version }}
sign-wasi-demo-oci:
if: ${{ inputs.dry_run == false }}
needs:
- release-wasi-demo
uses: ./.github/workflows/sign.yml
with:
image-name: "wasi-demo-oci"
version: ${{ inputs.version }}
sbom-wasi-demo-oci:
if: ${{ inputs.dry_run == false }}
needs:
- release-wasi-demo
uses: ./.github/workflows/sbom.yml
with:
image-name: "wasi-demo-oci"
version: ${{ inputs.version }}
sign-wasi-demo-oci-artifact:
if: ${{ inputs.dry_run == false }}
needs:
- release-wasi-demo
uses: ./.github/workflows/sign.yml
with:
image-name: "wasi-demo-oci-artifact"
version: ${{ inputs.version }}
sbom-wasi-demo-oci-artifact:
if: ${{ inputs.dry_run == false }}
needs:
- release-wasi-demo
uses: ./.github/workflows/sbom.yml
with:
image-name: "wasi-demo-oci-artifact"
version: ${{ inputs.version }}