ab01/.forgejo/workflow/docker-build.yml
2025-03-24 22:24:16 +01:00

32 lines
No EOL
1.1 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main # Ou la branche sur laquelle vous pushez habituellement
jobs:
build:
runs-on: alpine # Utilisation de votre runner nommé "fondation"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build Docker image
run: |
docker build -t git.wilmoredynamics.com/ab/ab01:${GITHUB_SHA::8} .
# Tag the image with 'latest'
docker tag git.wilmoredynamics.com/ab/ab01:${GITHUB_SHA::8} git.wilmoredynamics.com/ab/ab01:latest
- name: Log in to Forgejo Container Registry
uses: docker/login-action@v2
with:
registry: git.wilmoredynamics.com
username: Wilmore_Dynamics # Votre nom d'utilisateur ou organisation Forgejo
password: ${{ secrets.FORGEJO_TOKEN }} # Votre jeton d'accès personnel Forgejo
- name: Push Docker image to Forgejo Container Registry
run: |
docker push git.wilmoredynamics.com/ab/ab01:${GITHUB_SHA::8}
docker push git.wilmoredynamics.com/ab/ab01:latest