games_app/.gitea/workflows/ci.yml
Your Name 07ccda0349
Some checks failed
CI / test-and-build (push) Failing after 1m40s
Fix Gitea Actions registry access and runner config
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-17 20:03:55 +02:00

57 lines
1.6 KiB
YAML

# CI only — never deploys production.
name: CI
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Backend install + compile
working-directory: backend
run: npm ci && npm run build
- name: Set image tag
id: meta
run: |
SHA="${GITHUB_SHA:-}"
if [ -z "$SHA" ]; then SHA="$(git rev-parse HEAD)"; fi
echo "sha=${SHA:0:12}" >> "$GITHUB_OUTPUT"
echo "full=$SHA" >> "$GITHUB_OUTPUT"
- name: Build backend image
env:
REGISTRY: 172.16.0.1:5000
run: |
docker build -t ${REGISTRY}/tloto-backend:${{ steps.meta.outputs.sha }} ./backend
- name: Build web image
env:
REGISTRY: 172.16.0.1:5000
run: |
docker build \
--build-arg VITE_API_BASE_URL=http://127.0.0.1:9080 \
--build-arg VITE_WS_URL=ws://127.0.0.1:9080/ws/v1/games/candle-predict \
--build-arg VITE_WS_ENABLED=true \
-t ${REGISTRY}/tloto-web:${{ steps.meta.outputs.sha }} \
./prediqo_web
- name: Push images to local registry
env:
REGISTRY: 172.16.0.1:5000
run: |
docker push ${REGISTRY}/tloto-backend:${{ steps.meta.outputs.sha }}
docker push ${REGISTRY}/tloto-web:${{ steps.meta.outputs.sha }}
echo "CI_OK ${{ steps.meta.outputs.sha }}"