Files
Skori/.gitea/workflows/docker-build.yml
T
Zed 3a8ee28bdd
Build and Publish Docker Image / build-and-push-image (push) Failing after 34s
Remove QEMU step to simplify workflow
2026-07-06 19:09:05 +02:00

56 lines
1.7 KiB
YAML

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: http://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
with:
# Autorise explicitement les connexions HTTP vers votre registre Gitea
buildkitd-flags: --allow-insecure-entitlement ${{ env.REGISTRY }}
- 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
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push=true,registry.insecure=true