Add Gitea Action workflow to build and publish Docker image
Build and Publish Docker Image / build-and-push-image (push) Failing after 6m13s

This commit is contained in:
Zed
2026-07-06 18:41:27 +02:00
parent f5518b992e
commit 14a5a5198b
+51
View File
@@ -0,0 +1,51 @@
name: Build and Publish Docker Image
# Ce workflow se déclenche à chaque push sur la branche master
on:
push:
branches:
- master
env:
# L'adresse de votre Gitea (Registre Docker)
REGISTRY: 192.168.10.174:3000
# homer/Skori (Généré automatiquement par la variable)
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build-and-push-image:
# Assurez-vous que votre Gitea Runner possède le label 'ubuntu-latest' (c'est le défaut)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max