Files
telegram-shop/.gitea/workflows/release.yaml
NW 5c6760b180
All checks were successful
Release: ARM64 Docker Image / build-arm64 (push) Successful in 3m14s
ci: install docker-cli in alpine job container for build/push/save steps
2026-08-04 19:21:04 +01:00

71 lines
2.6 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: шаги.
# node:22-alpine не содержит bash → используем sh
runs-on: arm64
defaults:
run:
shell: sh
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-cli не входит в node:22-alpine — ставим через apk
apk add --no-cache docker-cli >/dev/null 2>&1
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
apk add --no-cache docker-cli >/dev/null 2>&1 || true
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
apk add --no-cache docker-cli >/dev/null 2>&1 || true
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/