Actualiser .gitea/workflows/build-push.yaml
Some checks failed
Build and Push Docker Image / build (push) Failing after 55s
Check Calibre-web version / check-version (push) Successful in 15s

This commit is contained in:
2025-04-13 20:54:58 +02:00
parent e99b04865e
commit 43629a815b

View File

@@ -7,9 +7,9 @@ on:
env: env:
IMAGE_NAME: public/calibre-web IMAGE_NAME: public/calibre-web
TAG: latest IMAGE_TAGS: latest pmo-${{ env.VERSION }}
REGISTRY_USER: eric@coissac.eu
IMAGE_REGISTRY: niepce.petite-maison-orange.fr IMAGE_REGISTRY: niepce.petite-maison-orange.fr
REGISTRY_USER: eric@coissac.eu
REGISTRY_PASSWORD: ${{ secrets.NIEPCETOKEN }} REGISTRY_PASSWORD: ${{ secrets.NIEPCETOKEN }}
CHECK: https://haoma.petite-maison-orange.fr/ping/7e80fab1-f1ed-4ece-81aa-cf9061cda5c4 CHECK: https://haoma.petite-maison-orange.fr/ping/7e80fab1-f1ed-4ece-81aa-cf9061cda5c4
RELEASE_FILE: calibre_web_latest.txt RELEASE_FILE: calibre_web_latest.txt
@@ -28,8 +28,7 @@ jobs:
- name: install Buildah - name: install Buildah
run: | run: |
apt-get update apt-get update
apt-get install -y buildah \ apt-get install -y podman
podman
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -49,20 +48,15 @@ jobs:
# Stocker la valeur dans une variable d'environnement # Stocker la valeur dans une variable d'environnement
echo "VERSION=$VERSION" >> $GITEA_ENV echo "VERSION=$VERSION" >> $GITEA_ENV
- name: Build image using buildah - name: Podman login
id: build-image run: |
uses: redhat-actions/buildah-build@v2 podman login ${{ env.REGISTRY }} \
with: -u ${{ env.REGISTRY_USER }} \
image: ${{ env.IMAGE_NAME }} -p ${{ env.REGISTRY_PASSWORD }}
tags: latest pmo-${{ env.VERSION }}
layers: true
containerfiles: |
./Dockerfile
extra-args: --storage-driver=overlay --isolation=chroot
env:
STORAGE_DRIVER: overlay
BUILDAH_ISOLATION: "chroot"
- name: Build and tag image
run: |
podman build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAGS }} .
- name: Canceled building - name: Canceled building
if: cancelled() if: cancelled()
@@ -82,21 +76,16 @@ jobs:
exit 1 exit 1
shell: bash shell: bash
- name: Push to Niepce Container Repository - name: Push image to registry
id: push-to-niepce run: |
uses: redhat-actions/push-to-registry@v2 podman push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAGS }}
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
- name: Push image failed - name: Push image failed
if: failure() if: failure()
run: | run: |
curl -fsS -m 10 --retry 5 \ curl -fsS -m 10 --retry 5 \
--data-raw "Failed to push docker image for $(cat bluesky_crossposter_latest.txt)" \ --data-raw "Failed to push docker image for $(cat ${{ env.RELEASE_FILE }})" \
${{ env.CHECK }}/fail ${{ env.CHECK }}/fail
exit 1 exit 1
shell: bash shell: bash
@@ -104,16 +93,8 @@ jobs:
- name: End of the job - name: End of the job
run: | run: |
curl -fsS -m 10 --retry 5 \ curl -fsS -m 10 --retry 5 \
--data-raw "Build docker image for $(cat bluesky_crossposter_latest.txt)" \ --data-raw "Build docker image for $(cat ${{ env.RELEASE_FILE }})" \
${{ env.CHECK }} ${{ env.CHECK }}
shell: bash 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)" \
${{ env.CHECK }}/fail
exit 1
shell: bash