diff --git a/.gitea/workflows/build-image.yml b/.gitea/workflows/build-image.yml index 66d4b1c6..0ed14ec1 100644 --- a/.gitea/workflows/build-image.yml +++ b/.gitea/workflows/build-image.yml @@ -49,6 +49,11 @@ on: type: boolean required: false default: false + health_check: + description: 'Perform health checks after deployment (default: true)' + type: boolean + required: false + default: true env: REGISTRY: registry.michaelschiemer.de @@ -309,8 +314,17 @@ jobs: bash --version git --version - - name: Checkout code + - name: Download repository artifact if: steps.decision.outputs.should_build == 'true' + uses: actions/download-artifact@v4 + with: + name: repository + path: /workspace + continue-on-error: true + id: download_repo + + - name: Checkout code (fallback if artifact missing) + if: steps.decision.outputs.should_build == 'true' && steps.download_repo.outcome == 'failure' shell: bash run: | REF_NAME="${{ github.ref_name }}" @@ -1083,6 +1097,7 @@ jobs: run: sleep 30 - name: Health check + if: ${{ github.event_name == 'push' || github.event.inputs.health_check != 'false' }} id: health run: | echo "🔍 Performing health checks with exponential backoff..." @@ -1264,6 +1279,7 @@ jobs: run: sleep 30 - name: Health check + if: ${{ github.event_name == 'push' || github.event.inputs.health_check != 'false' }} id: health run: | echo "🔍 Performing health checks with exponential backoff..."