Skip to content

Run tests with spin-registry-push as well #11

Run tests with spin-registry-push as well

Run tests with spin-registry-push as well #11

# name: 'Build and push Docker images'
# on:
# workflow_call:
# inputs:
# test:
# description: 'Is this a test run?'
# type: boolean
# required: true
# jobs:
# build_and_push:
# permissions:
# contents: write
# packages: write
# runs-on: ubuntu-latest
# strategy:
# matrix:
# image:
# - imageName: examples/spin-rust-hello
# context: images/spin
# - imageName: examples/spin-dotnet-hello
# context: images/spin_dotnet
# - imageName: examples/spin-inbound-redis
# context: images/spin-inbound-redis
# - imageName: examples/spin-outbound-redis
# context: images/spin-outbound-redis
# steps:
# - uses: actions/checkout@v4
# - name: Set RELEASE_VERSION ENV var
# run: echo "RELEASE_VERSION=$(echo -n ${GITHUB_REF} | cut -d '/' -f 3)" >> $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: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: setup buildx
# uses: docker/setup-buildx-action@v3
# - name: login to GitHub container registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: enable containerd image store
# run: |
# echo '{ "features": { "containerd-snapshotter": true } }' | sudo tee /etc/docker/daemon.json
# sudo systemctl restart docker
# - name: test
# uses: docker/build-push-action@v5
# if: ${{ inputs.test }}
# with:
# context: ${{ matrix.image.context }}
# load: true
# tags: containerd-shim-spin/${{ matrix.image.imageName }}:test
# platforms: wasi/wasm
# - name: build and push
# uses: docker/build-push-action@v5
# if: ${{ !inputs.test }}
# with:
# push: true
# tags: |
# ghcr.io/${{ github.repository }}/${{ matrix.image.imageName }}:${{ env.RELEASE_VERSION }}
# ghcr.io/${{ github.repository }}/${{ matrix.image.imageName }}:latest
# context: ${{ matrix.image.context }}
# platforms: wasi/wasm
# provenance: false