diff --git a/.forgejo/workflow/docker-build.yml b/.forgejo/workflow/docker-build.yml new file mode 100644 index 0000000..c544493 --- /dev/null +++ b/.forgejo/workflow/docker-build.yml @@ -0,0 +1,32 @@ +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 \ No newline at end of file