.gitea/workflows/linux_arm64_docker-release.yaml aktualisiert
Some checks failed
Build ARM64 Linux / build-arm64 (push) Has been cancelled
Build Docker Linux ARM64 / build-docker-linux-arm64 (push) Has been cancelled
Build Linux x64 / build-linux-x64 (push) Has been cancelled
Build Windows x64 / build-windows-x64 (push) Has been cancelled
Build Docker Linux ARM64 Release / build-docker-linux-arm64-release (push) Failing after 15m53s
Some checks failed
Build ARM64 Linux / build-arm64 (push) Has been cancelled
Build Docker Linux ARM64 / build-docker-linux-arm64 (push) Has been cancelled
Build Linux x64 / build-linux-x64 (push) Has been cancelled
Build Windows x64 / build-windows-x64 (push) Has been cancelled
Build Docker Linux ARM64 Release / build-docker-linux-arm64-release (push) Failing after 15m53s
This commit is contained in:
@@ -1,12 +1,18 @@
|
|||||||
name: Build Docker Linux ARM64 Release
|
name: Build Docker Linux ARM64 Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
push:
|
||||||
#types: [published]
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-docker-linux-arm64-release:
|
build-docker-linux-arm64-release:
|
||||||
runs-on: [self-hosted, linux, arm64, docker]
|
runs-on: [self-hosted, linux, arm64, docker]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write # Nötig, um das Release zu erstellen
|
||||||
|
packages: write # Nötig, um in die Container Registry zu pushen
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: apk add --no-cache git curl wget unzip bash nodejs npm docker
|
run: apk add --no-cache git curl wget unzip bash nodejs npm docker
|
||||||
@@ -14,27 +20,66 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# 1. Login bei der Gitea Registry
|
||||||
|
- name: Bei Gitea Container Registry anmelden
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ gitea.server_url }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# 2. Metadaten berechnen (sorgt für korrekte Tags wie :v1.0 und :latest)
|
||||||
|
- name: Metadaten für Docker extrahieren
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ gitea.server_url }}/${{ github.repository }}
|
||||||
|
tags: |
|
||||||
|
type=ref,event=tag
|
||||||
|
type=raw,value=latest,enable=${{ github.ref == format('refs/tags/{0}', github.ref_name) }}
|
||||||
|
|
||||||
|
# 3. Setup Docker Buildx (verbessert Performance und Caching)
|
||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Build Linux ARM64 Docker Image
|
# 4. Bauen und PUSHEN in die Registry
|
||||||
|
# Wir nutzen hier 'load: true', um das Image danach auch für 'docker save' verfügbar zu haben,
|
||||||
|
# und pushen es danach separat, oder wir bauen es direkt.
|
||||||
|
# Da build-push-action "push" und "load" (lokal speichern) oft nicht gleichzeitig kann,
|
||||||
|
# ist es am sichersten, das Image zu bauen und direkt zu pushen.
|
||||||
|
- name: Build and Push to Registry
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true # Lädt es direkt in Gitea "Pakete" hoch
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
# 5. Optional: Image zusätzlich als .tar bauen für den Release-Anhang
|
||||||
|
# (Falls Sie die Datei wirklich noch als Download brauchen)
|
||||||
|
- name: Build local for Tarball
|
||||||
run: docker build -t couchlog-linux-arm64 .
|
run: docker build -t couchlog-linux-arm64 .
|
||||||
|
|
||||||
- name: Save Docker Image to Tar
|
- name: Save Docker Image to Tar
|
||||||
run: docker save -o CouchLog-Linux-ARM64-Docker-Image.tar couchlog-linux-arm64
|
run: docker save -o CouchLog-Linux-ARM64-Docker-Image.tar couchlog-linux-arm64
|
||||||
|
|
||||||
- name: Zeige alle Dateien an (Debug)
|
# 6. Release erstellen und .tar Datei anhängen
|
||||||
run: ls -R
|
|
||||||
|
|
||||||
- name: Release erstellen & Datei hochladen
|
- name: Release erstellen & Datei hochladen
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
files: CouchLog-Linux-ARM-Docker-Image.tar # Pfad zur Datei, die hochgeladen werden soll
|
# Hier war vorher der Fehler (ARM vs ARM64) - jetzt korrigiert:
|
||||||
# Optional: Release-Text anpassen
|
files: CouchLog-Linux-ARM64-Docker-Image.tar
|
||||||
body: "Automatisches Release für ${{ github.ref_name }}"
|
body: |
|
||||||
|
## Docker Image
|
||||||
|
Das Image ist auch verfügbar unter:
|
||||||
|
`${{ gitea.server_url }}/${{ github.repository }}:${{ github.ref_name }}`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker pull ${{ gitea.server_url }}/${{ github.repository }}:${{ github.ref_name }}
|
||||||
|
```
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
fail_on_unmatched_files: true # Warnt, wenn der Name wieder falsch ist
|
||||||
env:
|
env:
|
||||||
# Gitea stellt diesen Token automatisch bereit, er wird für den Upload benötigt
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Reference in New Issue
Block a user