Build Spec Containers #745
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Spec Containers | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- .github/workflows/build-spec-containers.yml | |
- Dockerfile | |
- test-scripts | |
schedule: | |
- cron: '15 3 * * *' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
crystal: | |
- latest | |
- unstable | |
runs-on: ubuntu-latest | |
name: Build spec runner ${{ matrix.crystal }} | |
steps: | |
- | |
name: Checkout local actions and scripts | |
uses: actions/checkout@v3 | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Build image | |
id: build | |
uses: docker/build-push-action@v4 | |
with: | |
build-args: | | |
crystal_version=${{ matrix.crystal }} | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
cache-from: type=gha,scope=runner-${{ matrix.crystal }} | |
cache-to: type=gha,scope=runner-${{ matrix.crystal }},mode=max | |
tags: placeos/service-spec-runner:${{ matrix.crystal }} | |
labels: | | |
org.opencontainers.image.url=https://github.com/PlaceOS/.github | |
org.opencontainers.image.vendor=Place Technology Limited | |
org.opencontainers.image.title=PlaceOS Crystal Service Spec Runner |