From b5d1edb4e1c01b7af4131146e2b61f51d349bcb4 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Mon, 14 Apr 2025 15:13:25 +0200 Subject: [PATCH] Actualiser .gitea/workflows/build-push.yaml --- .gitea/workflows/build-push.yaml | 105 ++----------------------------- 1 file changed, 6 insertions(+), 99 deletions(-) diff --git a/.gitea/workflows/build-push.yaml b/.gitea/workflows/build-push.yaml index c721936..cc62c52 100644 --- a/.gitea/workflows/build-push.yaml +++ b/.gitea/workflows/build-push.yaml @@ -5,111 +5,18 @@ on: branches: - main # Changez cela si votre branche principale a un autre nom -env: - IMAGE_NAME: public/blueskycrossposter - IMAGE_TAGS: latest - IMAGE_REGISTRY: niepce.petite-maison-orange.fr - REGISTRY_USER: eric@coissac.eu - REGISTRY_PASSWORD: ${{ secrets.NIEPCETOKEN }} - CHECK: https://haoma.petite-maison-orange.fr/ping/814308c3-d90c-4511-b236-c40b37a5ad23 - RELEASE_FILE: bluesky_crossposter_latest.txt - CHECK_SERVER: https://haoma.petite-maison-orange.fr - CHECK_UUID: 814308c3-d90c-4511-b236-c40b37a5ad23 - jobs: build: runs-on: ubuntu-latest steps: - - name: Start the job - uses: https://gargoton.petite-maison-orange.fr/pmo-actions/healthchecks-ping@main + - name: Build and push image + uses: https://gargoton.petite-maison-orange.fr/pmo-actions/build-push-image@main with: - check_server: ${{ env.CHECK_SERVER }} - check_uuid: ${{ env.CHECK_UUID }} - check_command: start - check_message: 'Starting job for image ${{ env.IMAGE_NAME }}' - - - name: install podman - run: | - apt-get update - apt-get install -y podman - - - name: Checkout and get version - id: get_version - uses: https://gargoton.petite-maison-orange.fr/pmo-actions/software-version@main - with: - git_checkout: true - version_file: ${{ env.RELEASE_FILE }} - - - - name: Build image starting - uses: https://gargoton.petite-maison-orange.fr/pmo-actions/healthchecks-ping@main - with: - check_server: ${{ env.CHECK_SERVER }} - check_uuid: ${{ env.CHECK_UUID }} - check_command: log - check_message: 'Buildind docker image for ${{ steps.get_version.outputs.version }}' - - - name: Add PMO version tag - run: | - echo "IMAGE_TAGS=${{ env.IMAGE_TAGS }} pmo-${{ steps.get_version.outputs.version }}" >> $GITEA_ENV - - - name: Build and tag image - uses: https://gargoton.petite-maison-orange.fr/pmo-actions/build-image@main - with: - image_name: '${{ env.IMAGE_NAME }}' - image_tags: '${{ env.IMAGE_TAGS }}' - debug: true - - - name: Canceled building - if: cancelled() - uses: https://gargoton.petite-maison-orange.fr/pmo-actions/healthchecks-ping@main - with: - check_server: ${{ env.CHECK_SERVER }} - check_uuid: ${{ env.CHECK_UUID }} - check_command: fail - check_message: 'Building image cancelled for $(cat ${{ env.RELEASE_FILE }})' - - - name: Build image failed - if: failure() - uses: https://gargoton.petite-maison-orange.fr/pmo-actions/healthchecks-ping@main - with: - check_server: ${{ env.CHECK_SERVER }} - check_uuid: ${{ env.CHECK_UUID }} - check_command: fail - check_message: 'Failed to build docker image for $(cat ${{ env.RELEASE_FILE }})' - - - name: Image built and tagged - uses: https://gargoton.petite-maison-orange.fr/pmo-actions/healthchecks-ping@main - with: - check_server: ${{ env.CHECK_SERVER }} - check_uuid: ${{ env.CHECK_UUID }} - check_command: log - check_message: 'Docker image for $(cat ${{ env.RELEASE_FILE }}) built and tagged' - - - name: Push image to registry - uses: https://gargoton.petite-maison-orange.fr/pmo-actions/push-image@main - with: - registry_login: true - image_name: '${{ env.IMAGE_NAME }}' - image_tags: '${{ env.IMAGE_TAGS }}' - - - name: Push image failed - if: failure() - uses: https://gargoton.petite-maison-orange.fr/pmo-actions/healthchecks-ping@main - with: - check_server: ${{ env.CHECK_SERVER }} - check_uuid: ${{ env.CHECK_UUID }} - check_command: fail - check_message: 'Failed to push docker image for $(cat ${{ env.RELEASE_FILE }})' - - - name: End of the image building - uses: https://gargoton.petite-maison-orange.fr/pmo-actions/healthchecks-ping@main - with: - check_server: ${{ env.CHECK_SERVER }} - check_uuid: ${{ env.CHECK_UUID }} - check_command: stop - check_message: 'Docker image for $(cat ${{ env.RELEASE_FILE }}): task done' + image_name: public/blueskycrossposter + image_tags: latest + version_file: bluesky_crossposter_latest.txt + check_uuid: 814308c3-d90c-4511-b236-c40b37a5ad23 \ No newline at end of file