Files
telegram-shop/.gitea/workflows/release.yaml
NW 49d3f41686
Some checks failed
Release: ARM64 Docker Image / build-arm64 (push) Failing after 12s
ci: release workflow without GitHub actions (network blocked) - pure run steps
- GitHub unreachable on prod network; actions/checkout@v4 etc fail to download
- Rewrite release.yaml using only run: steps (git clone from Gitea, docker build/push)
- Clone uses REGISTRY_TOKEN (oauth2) from Gitea secrets
- Registry push is best-effort; always saves image tarball artifact
2026-08-04 18:30:35 +01:00

61 lines
2.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: "Release: ARM64 Docker Image"
on:
push:
tags:
- "v*"
jobs:
build-arm64:
# Нативный ARM64 runner на Orange Pi Zero 2 (aarch64).
# GitHub недоступен в этой сети — НЕ используем actions/*, только чистые run: шаги.
runs-on: arm64
steps:
- name: Checkout code
run: |
set -e
cd /tmp
rm -rf release-src
git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
"https://oauth2:${REGISTRY_TOKEN}@git.softuniq.eu/Telegram-Market/telegram-shop.git" release-src
cd release-src
git rev-parse --short HEAD
- name: Extract version
id: meta
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "VERSION=${VERSION}" >> "$GITHUB_ENV"
echo "Build version: ${VERSION}"
- name: Build ARM64 image
working-directory: /tmp/release-src
run: |
set -e
docker build \
--file ./Dockerfile \
--tag git.softuniq.eu/telegram-market/telegram-shop:${VERSION} \
--tag git.softuniq.eu/telegram-market/telegram-shop:latest \
.
- name: Push to Gitea Container Registry (best effort)
working-directory: /tmp/release-src
run: |
set -e
echo "${REGISTRY_TOKEN}" | docker login git.softuniq.eu -u oauth2 --password-stdin \
|| { echo "registry login failed, skipping push"; exit 0; }
docker push git.softuniq.eu/telegram-market/telegram-shop:${VERSION} \
|| echo "push tag failed (may need package scope)"
docker push git.softuniq.eu/telegram-market/telegram-shop:latest \
|| echo "push latest failed (may need package scope)"
docker logout git.softuniq.eu || true
- name: Save image tarball artifact
working-directory: /tmp/release-src
run: |
set -e
mkdir -p /tmp/release-artifacts
docker save git.softuniq.eu/telegram-market/telegram-shop:${VERSION} \
-o /tmp/release-artifacts/telegram-shop-arm64-${VERSION}.tar
ls -lah /tmp/release-artifacts/