Add Gitea Actions workflow for building and pushing Docker image to registry
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 14s
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 14s
This commit is contained in:
35
.gitea/workflows/build-and-push.yml
Normal file
35
.gitea/workflows/build-and-push.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
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
|
||||
|
||||
# Мы убрали Buildx для стабильности на первом этапе
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
# ВАЖНО: используем порт 3000 (веб/registry), а не 7777 (ssh)
|
||||
registry: 192.168.50.55:3000
|
||||
username: ${{ secrets.GIT_USERNAME }}
|
||||
password: ${{ secrets.GIT_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
# Мы убрали platforms, так как Synology собирает под свою архитектуру (обычно amd64)
|
||||
push: true
|
||||
tags: |
|
||||
192.168.50.55:3000/poignatov/play-life:latest
|
||||
192.168.50.55:3000/poignatov/play-life:${{ github.sha }}
|
||||
Reference in New Issue
Block a user