Skip to content

build images

build images #73

Workflow file for this run

name: build images
on:
workflow_dispatch:
schedule:
- cron: "0 4 * * *"
push:
branches:
- master
jobs:
push:
name: Build and push
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
image: [smp]
tag: [24]
arch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image (per-arch)
uses: docker/build-push-action@v4
with:
context: ./images
file: ./images/${{ matrix.image }}/${{ matrix.tag }}/Dockerfile
platforms: ${{ format('linux/{0}', matrix.arch) }}
push: true
tags: |
ghcr.io/bloodstonemc/pterodactyl-yolks:${{ matrix.image }}${{ matrix.tag }}-${{ matrix.arch }}
build-args: |
TARGETOS=linux
TARGETARCH=${{ matrix.arch }}