Skip to content

Build Spec Containers #745

Build Spec Containers

Build Spec Containers #745

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