Files
play-life/.gitea/workflows/build-and-push.yml
poignatov 185b9b7e31
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 14s
Update workflow configuration
2025-12-30 19:47:46 +03:00

34 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: Create Insecure Tunnel
run: |
# Мы запускаем крошечный прокси-контейнер внутри раннера.
# Он связывает localhost:5000 раннера с реальной Gitea 172.17.0.6:3000.
# Docker ВСЕГДА разрешает HTTP для localhost.
docker run -d --name proxy --network host alpine sh -c "apk add socat && socat TCP-LISTEN:5000,fork,reuseaddr TCP:172.17.0.6:3000"
# Даем 2 секунды на запуск
sleep 2
- name: Log in to Gitea Registry
run: |
# Теперь мы логинимся в localhost. Docker пропустит это без SSL!
echo "${{ secrets.GIT_TOKEN }}" | docker login localhost:5000 -u ${{ secrets.GIT_USERNAME }} --password-stdin
- name: Build and Push
run: |
# Собираем и пушим через наш туннель
docker build -t localhost:5000/poignatov/play-life:latest .
docker push localhost:5000/poignatov/play-life:latest