Some checks failed
Build AppImage / build (push) Failing after 7s
Der 17-Forgejo-Runner (docker:host-Label) hat Rust 1.87, Node 22, GTK, WebKit, AppIndicator, patchelf usw. bereits aus dem docker.forgejo-runner-Image vorinstalliert. Der bisherige container:-Block mit rust:1.83-bookworm + apt-get install hat wegen DNS/Netzwerk in der DinD-Umgebung versagt. Loesung: container: komplett entfernen, Job laeuft direkt im Runner. Spart den Pull, spart die apt-Installationen und umgeht das DNS-Problem.
103 lines
3.8 KiB
YAML
103 lines
3.8 KiB
YAML
# Claude Desktop — AppImage Build Pipeline
|
|
# Triggert bei [appimage] im Commit oder bei Release-Tags (v*)
|
|
# Runner: data-it/forgejo-runner mit Rust + GTK vorinstalliert
|
|
|
|
name: Build AppImage
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
if: contains(github.event.head_commit.message, '[appimage]') || startsWith(github.ref, 'refs/tags/v')
|
|
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
|
|
"https://oauth2:${{ secrets.REGISTRY_TOKEN }}@git.data-it-solution.de/${GITHUB_REPOSITORY}.git" .
|
|
|
|
- name: Show Rust Version
|
|
run: |
|
|
rustc --version
|
|
cargo --version
|
|
|
|
- name: Install npm packages
|
|
run: npm ci
|
|
|
|
- name: Build Tauri App
|
|
run: |
|
|
npm run tauri build -- --bundles appimage
|
|
ls -la src-tauri/target/release/bundle/appimage/
|
|
|
|
- name: Get Version
|
|
id: version
|
|
run: |
|
|
VERSION=$(grep '^version' src-tauri/Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')
|
|
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
|
echo "Version: ${VERSION}"
|
|
|
|
- name: Upload to Package Registry
|
|
run: |
|
|
APPIMAGE=$(ls src-tauri/target/release/bundle/appimage/*.AppImage | head -1)
|
|
FILENAME=$(basename "$APPIMAGE")
|
|
VERSION=$(grep '^version' src-tauri/Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')
|
|
|
|
echo "Lade $FILENAME (v${VERSION}) in Package Registry..."
|
|
|
|
# Latest löschen falls vorhanden
|
|
curl -s -X DELETE \
|
|
--user "data:${{ secrets.REGISTRY_TOKEN }}" \
|
|
"https://git.data-it-solution.de/api/packages/data/generic/claude-desktop/latest/${FILENAME}" || true
|
|
|
|
# Versioniert hochladen
|
|
curl -s -X PUT \
|
|
--user "data:${{ secrets.REGISTRY_TOKEN }}" \
|
|
--upload-file "$APPIMAGE" \
|
|
"https://git.data-it-solution.de/api/packages/data/generic/claude-desktop/${VERSION}/${FILENAME}"
|
|
|
|
# Latest hochladen
|
|
curl -s -X PUT \
|
|
--user "data:${{ secrets.REGISTRY_TOKEN }}" \
|
|
--upload-file "$APPIMAGE" \
|
|
"https://git.data-it-solution.de/api/packages/data/generic/claude-desktop/latest/${FILENAME}"
|
|
|
|
echo "Upload abgeschlossen: ${FILENAME} (v${VERSION})"
|
|
|
|
- name: Upload to Release
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
run: |
|
|
APPIMAGE=$(ls src-tauri/target/release/bundle/appimage/*.AppImage | head -1)
|
|
FILENAME=$(basename "$APPIMAGE")
|
|
TAG="${GITHUB_REF#refs/tags/}"
|
|
|
|
echo "Lade $FILENAME zu Release $TAG hoch..."
|
|
|
|
# Release erstellen falls nicht vorhanden
|
|
curl -s -X POST \
|
|
-H "Authorization: token ${{ secrets.REGISTRY_TOKEN }}" \
|
|
-H "Content-Type: application/json" \
|
|
"https://git.data-it-solution.de/api/v1/repos/${GITHUB_REPOSITORY}/releases" \
|
|
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"body\":\"Release ${TAG}\"}" || true
|
|
|
|
# Release-ID holen
|
|
RELEASE_ID=$(curl -s \
|
|
-H "Authorization: token ${{ secrets.REGISTRY_TOKEN }}" \
|
|
"https://git.data-it-solution.de/api/v1/repos/${GITHUB_REPOSITORY}/releases/tags/${TAG}" \
|
|
| grep -o '"id":[0-9]*' | head -1 | sed 's/"id"://')
|
|
|
|
echo "Release-ID: $RELEASE_ID"
|
|
|
|
# AppImage hochladen
|
|
curl -s -X POST \
|
|
-H "Authorization: token ${{ secrets.REGISTRY_TOKEN }}" \
|
|
-H "Content-Type: application/octet-stream" \
|
|
"https://git.data-it-solution.de/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=${FILENAME}" \
|
|
--data-binary "@${APPIMAGE}"
|
|
|
|
echo "Upload abgeschlossen: ${FILENAME}"
|