41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
name: Build Docker Linux ARM64
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main # Hier aktiviert: Läuft nur bei Push auf main
|
|
|
|
jobs:
|
|
build-docker-linux-x64:
|
|
runs-on: [self-hosted, linux, arm64, docker]
|
|
steps:
|
|
- name: Install packages
|
|
run: apk add --no-cache git curl wget unzip bash nodejs npm docker
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
# Buildx ist gut für Cross-Platform, aber auch lokal nützlich
|
|
- name: Setup Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build Linux ARM64 Docker Image
|
|
run: |
|
|
# Wir bauen das Image und laden es (--load) in den lokalen Docker Daemon
|
|
docker buildx build \
|
|
--platform linux/arm64 \
|
|
-t myapp:linux-arm64 \
|
|
--load .
|
|
|
|
- name: Save Docker Image to Tar
|
|
# Jetzt exportieren wir das geladene Image in eine Datei
|
|
run: docker save -o my-image-arm64.tar myapp:linux-arm64
|
|
|
|
- name: Upload Artifact
|
|
# Lädt die Datei in Gitea hoch
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: docker-image-arm64 # So heißt der Download-Button später
|
|
path: my-image-arm64.tar
|
|
if-no-files-found: error
|
|
retention-days: 1 # Optional: Wie lange die Datei gespeichert bleibt |