Skip to content

Commit 9a07f90

Browse files
committed
Build and publish our docker image automatically
1 parent f65d2d4 commit 9a07f90

2 files changed

Lines changed: 54 additions & 1 deletion

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build and Publish Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'build_image/**'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
env:
16+
PACKAGE_REGISTRY: ghcr.io
17+
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/prime-practice-native/build
18+
19+
jobs:
20+
publish:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v5
25+
26+
# - name: Set up QEMU
27+
# uses: docker/setup-qemu-action@v3
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Set build date tag
33+
id: date
34+
run: |
35+
echo "build_date=$(date -u +%Y%m%d)" >> "$GITHUB_OUTPUT"
36+
37+
- name: Log in to GitHub Container Registry
38+
uses: docker/login-action@v2
39+
with:
40+
registry: ${{ env.PACKAGE_REGISTRY }}
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- name: Build and push Docker image
45+
uses: docker/build-push-action@v5
46+
with:
47+
context: build_image
48+
file: build_image/Dockerfile
49+
push: true
50+
platforms: linux/amd64,linux/arm64
51+
tags: |
52+
${{ env.IMAGE_NAME }}:latest
53+
${{ env.IMAGE_NAME }}:${{ steps.date.outputs.build_date }}

build_image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM devkitpro/devkitppc:20251117
1+
FROM --platform=$BUILDPLATFORM devkitpro/devkitppc:20251117 as builder
22
LABEL authors="pwootage"
33

44
# Need to install llvm, as practice mod also requires it

0 commit comments

Comments
 (0)