Actualiser .gitea/workflows/build-push.yaml
Some checks failed
Check BlueSky Crossposter version / check-version (push) Successful in 17s
Build and Push Docker Image / build (push) Failing after 27s

This commit is contained in:
2025-04-13 17:39:30 +02:00
parent b4e1066853
commit 160379fde4

View File

@@ -5,6 +5,14 @@ on:
branches:
- main # Changez cela si votre branche principale a un autre nom
env:
IMAGE_NAME: blueskycrossposter
TAG: latest
REGISTRY_USER: eric@coissac.eu
IMAGE_REGISTRY: niepce.petite-maison-orange.fr
REGISTRY_PASSWORD: ${{ secrets.NIEPCETOKEN }}
CHECK: https://haoma.petite-maison-orange.fr/ping/814308c3-d90c-4511-b236-c40b37a5ad23
jobs:
build:
runs-on: ubuntu-latest
@@ -13,7 +21,7 @@ jobs:
- name: Start the job
run: |
curl -fsS -m 10 --retry 5 \
https://haoma.petite-maison-orange.fr/ping/814308c3-d90c-4511-b236-c40b37a5ad23/start
${{ env.CHECK }}/start
shell: bash
- name: Checkout code
@@ -23,42 +31,57 @@ jobs:
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
${{ env.CHECK }}/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
- name: Set up Buildah
id: build-image
uses: redhat-actions/buildah-build@v2
with:
registry: niepce.petite-maison-orange.fr
username: eric@coissac.eu
password: ${{ secrets.NIEPCETOKEN }} # Assurez-vous d'ajouter ce secret dans Gitea
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ github.sha }}
containerfiles: |
./Dockerfile
- name: Build and push Docker image
- name: Canceled building
if: cancelled()
run: |
docker build --tag niepce.petite-maison-orange.fr/public/blueskycrossposter:latest .
curl -fsS -m 10 --retry 5 \
--data-raw "Building image cancelled for $(cat bluesky_crossposter_latest.txt)" \
${{ env.CHECK }}/fail
exit 1
shell: bash
- 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
${{ env.CHECK }}/fail
exit 1
shell: bash
- name: Push Docker image
run: |
docker push niepce.petite-maison-orange.fr/public/blueskycrossposter:latest
- name: Log in to Niepce Docker Registry
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
- name: Push to GitHub Container Repository
id: push-to-niepce
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
- 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
${{ env.CHECK }}/fail
exit 1
shell: bash
@@ -66,14 +89,14 @@ jobs:
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
${{ env.CHECK }}
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
${{ env.CHECK }}/fail
exit 1
shell: bash