ab01/.forgejo/workflows/docker-build.yml
ab 964217ef34
Some checks failed
Build and Push Docker Image / build (push) Failing after 6m18s
ab
2025-03-24 23:29:33 +01:00

32 lines
No EOL
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
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: AB # 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