Files
play-life/.gitea/workflows/build-and-push.yml
poignatov 60bb4ff9a4
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6s
Update workflow: use local registry IP and remove buildx
2025-12-30 19:45:36 +03:00

33 lines
1.3 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: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to Gitea Registry
run: |
# Используем внутренний IP и ПРЯМУЮ команду.
# Это заставляет клиент быть менее требовательным к SSL.
echo "${{ secrets.GIT_TOKEN }}" | docker login http://172.17.0.6:3000 -u ${{ secrets.GIT_USERNAME }} --password-stdin
- name: Build Docker Image
run: |
# Собираем образ с тегом внутреннего IP
docker build -t 172.17.0.6:3000/poignatov/play-life:latest .
docker tag 172.17.0.6:3000/poignatov/play-life:latest 172.17.0.6:3000/poignatov/play-life:${{ github.sha }}
- name: Push to Registry
run: |
# Пушим напрямую.
# Если демон на Synology увидит обращение к 172.x.x.x, он может пропустить его как локальный.
docker push 172.17.0.6:3000/poignatov/play-life:latest
docker push 172.17.0.6:3000/poignatov/play-life:${{ github.sha }}