Files
telegram-shop/.gitea/workflows/release.yaml
NW 4186ebeab6
Some checks failed
Release: ARM64 Docker Image / build-arm64 (push) Failing after 12s
ci: fix checkout step - git in alpine + pass REGISTRY_TOKEN via env
2026-08-04 18:33:50 +01:00

63 lines
2.2 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
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
steps:
- name: Checkout code
run: |
set -e
apk add --no-cache git >/dev/null 2>&1 || true
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
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/