Skip to content

Build Images

Build Images #122

Workflow file for this run

name: Build Images
#on:
# push:
# branches:
# - "master"
on:
workflow_dispatch: {}
schedule:
- cron: '0 0 * * *'
jobs:
build:
name: Build and Push
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: GHCR Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.platform }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Cache Platform Name
env:
PLATFORM: ${{ matrix.platform }}
run: echo "PLATFORM=${PLATFORM/\//-}" >> $GITHUB_ENV
-
name: Build Klipper
uses: docker/build-push-action@v6
with:
platforms: ${{ matrix.platform }}
context: .
cache-from: type=registry,ref=ghcr.io/nelsongraca/kdock-cache:buildcache-${{ env.PLATFORM }}
cache-to: type=registry,ref=ghcr.io/nelsongraca/kdock-cache:buildcache-${{ env.PLATFORM }},mode=max
push: true
provenance: false
tags: ghcr.io/nelsongraca/kdock-klipper:latest
target: klipper
-
name: Build Moonraker
uses: docker/build-push-action@v6
with:
platforms: ${{ matrix.platform }}
context: .
cache-from: type=registry,ref=ghcr.io/nelsongraca/kdock-cache:buildcache-${{ env.PLATFORM }}
cache-to: type=registry,ref=ghcr.io/nelsongraca/kdock-cache:buildcache-${{ env.PLATFORM }},mode=max
push: true
provenance: false
tags: ghcr.io/nelsongraca/kdock-moonraker:latest
target: moonraker