This commit is contained in:
@@ -9,7 +9,7 @@ name: Release Images
|
|||||||
# - dtrack-http amd64 ("nicht Mac" / Intel)
|
# - dtrack-http amd64 ("nicht Mac" / Intel)
|
||||||
# - dtrack-http arm64 (Apple Silicon Mac)
|
# - dtrack-http arm64 (Apple Silicon Mac)
|
||||||
#
|
#
|
||||||
# Spiegelt den Godforge/deploy.yml-Stil (host-Runner, curl+jq, secrets.GITEATOKEN).
|
# Auth ueber das automatische Actions-Token (gitea.token) -- kein Secret noetig.
|
||||||
# Hinweis: braucht das buildx-Plugin und privilegiertes QEMU-binfmt fuer arm64.
|
# Hinweis: braucht das buildx-Plugin und privilegiertes QEMU-binfmt fuer arm64.
|
||||||
# nodejs ist noetig, weil actions/checkout eine Node-Action ist.
|
# nodejs ist noetig, weil actions/checkout eine Node-Action ist.
|
||||||
|
|
||||||
@@ -51,22 +51,27 @@ jobs:
|
|||||||
docker buildx inspect --bootstrap
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
- name: Build, save & attach
|
- name: Build, save & attach
|
||||||
|
env:
|
||||||
|
# Automatisches, schreibberechtigtes Token des Laufs.
|
||||||
|
TOKEN: ${{ gitea.token }}
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
TAG="${{ steps.vars.outputs.tag }}"
|
TAG="${{ steps.vars.outputs.tag }}"
|
||||||
REPO="${{ gitea.repository }}"
|
REPO="${{ gitea.repository }}"
|
||||||
API="https://git.sithies.de/api/v1/repos/${REPO}/releases"
|
API="https://git.sithies.de/api/v1/repos/${REPO}/releases"
|
||||||
AUTH="Authorization: token ${{ secrets.GITEATOKEN }}"
|
AUTH="Authorization: token ${TOKEN}"
|
||||||
|
|
||||||
# Release-Lookup mit Diagnose (privates Repo -> Auth noetig).
|
# Release-Lookup mit Diagnose.
|
||||||
HTTP=$(curl -s -o /tmp/rel.json -w "%{http_code}" "${API}/tags/${TAG}" -H "$AUTH")
|
HTTP=$(curl -s -o /tmp/rel.json -w "%{http_code}" "${API}/tags/${TAG}" -H "$AUTH")
|
||||||
REL_ID=$(jq -r '.id // empty' /tmp/rel.json 2>/dev/null || true)
|
REL_ID=$(jq -r '.id // empty' /tmp/rel.json 2>/dev/null || true)
|
||||||
if [ -z "$REL_ID" ]; then
|
if [ -z "$REL_ID" ]; then
|
||||||
echo "ERROR: Release-Lookup fehlgeschlagen (HTTP ${HTTP}) fuer Tag '${TAG}'."
|
echo "ERROR: Release-Lookup fehlgeschlagen (HTTP ${HTTP}) fuer Tag '${TAG}'."
|
||||||
if [ -z "${{ secrets.GITEATOKEN }}" ]; then
|
if [ -z "${TOKEN}" ]; then
|
||||||
echo " -> Secret GITEATOKEN ist in DIESEM Repo NICHT gesetzt."
|
echo " -> gitea.token ist leer (Actions-Token nicht verfuegbar)."
|
||||||
else
|
else
|
||||||
echo " -> GITEATOKEN ist gesetzt; vermutlich fehlt dem Token der Scope (repository) oder der Tag stimmt nicht."
|
echo " -> Token vorhanden; evtl. fehlt dem Workflow-Token Schreibrecht"
|
||||||
|
echo " (Repo Settings -> Actions -> General -> Workflow permissions = Read/Write),"
|
||||||
|
echo " oder der Tag '${TAG}' stimmt nicht."
|
||||||
fi
|
fi
|
||||||
echo " Antwort (gekuerzt): $(head -c 300 /tmp/rel.json)"
|
echo " Antwort (gekuerzt): $(head -c 300 /tmp/rel.json)"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user