Files
telegram-shop/.gitea/workflows/release.yaml
NW eac2a0cd6c
Some checks failed
Release: ARM64 Docker Image / build-arm64 (push) Failing after 1m40s
ci: use sh shell in release workflow (node:22-alpine has no bash)
2026-08-04 19:17:33 +01:00

67 lines
2.4 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 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/