Skip to content

update to the newest main branch from runwasi (#131) #24

update to the newest main branch from runwasi (#131)

update to the newest main branch from runwasi (#131) #24

Workflow file for this run

name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.*'
jobs:
build:
uses: ./.github/workflows/build.yaml
release:
permissions:
contents: write
packages: write
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set RELEASE_VERSION ENV var
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: lowercase the runner OS name
shell: bash
run: |
OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
echo "RUNNER_OS=$OS" >> $GITHUB_ENV
- name: copy release workload assets into _dist
run: |
mkdir -p _dist
cp ./deployments/workloads/runtime.yaml _dist/runtime.yaml
cp ./deployments/workloads/workload.yaml _dist/workload.yaml
- uses: actions/download-artifact@v3
with:
path: _artifacts
- name: create release
env:
GH_TOKEN: ${{ secrets.envPAT }}
run: |
gh release create ${{ env.RELEASE_VERSION }} \
--generate-notes \
-p \
_dist/runtime.yaml#example-runtimes \
_dist/workload.yaml#example-workloads \
for f in ./_artifacts/*/*.tar.gz; do gh release upload ${{ env.RELEASE_VERSION }} $f; done
# Setup buildx to build multiarch image: https://github.com/docker/build-push-action/blob/master/docs/advanced/multi-platform.md
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: setup buildx
uses: docker/setup-buildx-action@v2
- name: login to GitHub container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.envPAT }}
- name: Build and push images
uses: ./.github/workflows/build_and_push.yaml
with:
images: |
[{"imageName": "examples/spin-rust-hello", "context": "images/spin"},
{"imageName": "examples/spin-dotnet-hello", "context": "images/spin_dotnet"},
{"imageName": "examples/slight-rust-hello", "context": "images/slight"},
{"imageName": "examples/wws-js-hello", "context": "images/wws"},
{"imageName": "examples/spin-inbound-redis", "context": "images/spin-inbound-redis"},
{"imageName": "examples/spin-outbound-redis", "context": "images/spin-outbound-redis"}],
{"imageName": "examples/lunatic-rust-hello", "context": "images/lunatic"}],
{"imageName": "examples/lunatic-spawn-process", "context": "images/lunatic-spawn-process"}],
{"imageName": "examples/lunatic-submillisecond", "context": "images/lunatic-submillisecond"}]
platforms: wasi/wasm
- name: untar x86_64 musl artifacts into ./deployments/k3d/.tmp dir
run: |
mkdir -p ./deployments/k3d/.tmp
tar -xf ./_artifacts/containerd-wasm-shims-v1-linux-x86_64/containerd-wasm-shims-v1-linux-x86_64.tar.gz \
--directory ./deployments/k3d/.tmp
- name: build and push k3d shim image
uses: docker/build-push-action@v3
with:
push: true
tags: |
ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:${{ env.RELEASE_VERSION }}
ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:latest
context: deployments/k3d
platforms: linux/amd64,linux/arm64
- name: clear
if: always()
run: |
rm -f ${HOME}/.docker/config.json