Skip to content

Fix matrix setup

Fix matrix setup #27

Workflow file for this run

name: ci-nullplatform
env:
NULLPLATFORM_API_KEY: ${{ secrets.NULLPLATFORM_API_KEY }}
on:
push:
branches:
- master
- main
- fix/runner-authorization
permissions:
id-token: write
contents: read
packages: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- asset-arch: linux/amd64
runner-arch: linux-x64
asset-name: runner-linux-amd64
- asset-arch: linux/arm64
runner-arch: linux-arm64
asset-name: runner-linux-arm64
steps:
- name: Install nullplatform cli
run: curl https://cli.nullplatform.com/install.sh | sh
- name: Checkout code
uses: actions/checkout@v4
- name: Start nullplatform CI
run: np build start
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build asset
run: docker buildx build --build-arg ARCH=${{ matrix.platform.runner-arch }} --platform ${{ matrix.platform.asset-arch }} -t ${{ matrix.platform.asset-name }} --load .
- name: Push ARM asset
run: np asset push --type docker-image --source ${{ matrix.platform.asset-name }} --name ${{ matrix.platform.asset-name }}
- name: End nullplatform CI
if: ${{ always() }}
run: np build update --status ${{ contains(fromJSON('["failure", "cancelled"]'), job.status) && 'failed' || 'successful' }}