Files
blueskycrossposter/.gitea/workflows/build-push.yaml
Eric Coissac e050fbb0a7
All checks were successful
Build and Push Docker Image / build (push) Successful in 44s
Check BlueSky Crossposter version / check-version (push) Successful in 17s
Actualiser .gitea/workflows/build-push.yaml
2025-04-05 22:57:13 +02:00

80 lines
2.7 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main # Changez cela si votre branche principale a un autre nom
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Start the job
run: |
curl -fsS -m 10 --retry 5 \
https://haoma.petite-maison-orange.fr/ping/814308c3-d90c-4511-b236-c40b37a5ad23/start
shell: bash
- name: Checkout code
uses: actions/checkout@v4
- name: Build image starting
run: |
curl -fsS -m 10 --retry 5 \
--data-raw "Buildind docker image for $(cat bluesky_crossposter_latest.txt)" \
https://haoma.petite-maison-orange.fr/ping/814308c3-d90c-4511-b236-c40b37a5ad23/log
shell: bash
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Docker Registry
uses: docker/login-action@v3
with:
registry: gargoton.petite-maison-orange.fr
username: eric
password: ${{ secrets.GARGOTONTOKEN }} # Assurez-vous d'ajouter ce secret dans Gitea
- name: Build and push Docker image
run: |
docker build --tag gargoton.petite-maison-orange.fr/image/blueskycrossposter:latest .
- name: Build image failed
if: failure()
run: |
curl -fsS -m 10 --retry 5 \
--data-raw "Failed to build docker image for $(cat bluesky_crossposter_latest.txt)" \
https://haoma.petite-maison-orange.fr/ping/814308c3-d90c-4511-b236-c40b37a5ad23/fail
exit 1
shell: bash
- name: Push Docker image
run: |
docker push gargoton.petite-maison-orange.fr/image/blueskycrossposter:latest
- name: Push image failed
if: failure()
run: |
curl -fsS -m 10 --retry 5 \
--data-raw "Failed to push docker image for $(cat bluesky_crossposter_latest.txt)" \
https://haoma.petite-maison-orange.fr/ping/814308c3-d90c-4511-b236-c40b37a5ad23/fail
exit 1
shell: bash
- name: End of the job
run: |
curl -fsS -m 10 --retry 5 \
--data-raw "Build docker image for $(cat bluesky_crossposter_latest.txt)" \
https://haoma.petite-maison-orange.fr/ping/814308c3-d90c-4511-b236-c40b37a5ad23
shell: bash
- name: Canceled building
if: cancelled()
run: |
curl -fsS -m 10 --retry 5 \
--data-raw "Building image cancelled for $(cat bluesky_crossposter_latest.txt)" \
https://haoma.petite-maison-orange.fr/ping/814308c3-d90c-4511-b236-c40b37a5ad23/fail
exit 1
shell: bash