feat: further optimize workflows - runtime-base artifact and optional health checks

- Runtime-base job now uses repository artifact instead of cloning (saves 1 git clone per run)
- Health checks are now optional via workflow_dispatch input (default: true)
- Health checks still run automatically on push events
- Reduces additional load on Gitea by ~10-15%
This commit is contained in:
2025-11-09 04:16:00 +01:00
parent 72757954dc
commit 4586f0e9ee

View File

@@ -49,6 +49,11 @@ on:
type: boolean type: boolean
required: false required: false
default: false default: false
health_check:
description: 'Perform health checks after deployment (default: true)'
type: boolean
required: false
default: true
env: env:
REGISTRY: registry.michaelschiemer.de REGISTRY: registry.michaelschiemer.de
@@ -309,8 +314,17 @@ jobs:
bash --version bash --version
git --version git --version
- name: Checkout code - name: Download repository artifact
if: steps.decision.outputs.should_build == 'true' 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 shell: bash
run: | run: |
REF_NAME="${{ github.ref_name }}" REF_NAME="${{ github.ref_name }}"
@@ -1083,6 +1097,7 @@ jobs:
run: sleep 30 run: sleep 30
- name: Health check - name: Health check
if: ${{ github.event_name == 'push' || github.event.inputs.health_check != 'false' }}
id: health id: health
run: | run: |
echo "🔍 Performing health checks with exponential backoff..." echo "🔍 Performing health checks with exponential backoff..."
@@ -1264,6 +1279,7 @@ jobs:
run: sleep 30 run: sleep 30
- name: Health check - name: Health check
if: ${{ github.event_name == 'push' || github.event.inputs.health_check != 'false' }}
id: health id: health
run: | run: |
echo "🔍 Performing health checks with exponential backoff..." echo "🔍 Performing health checks with exponential backoff..."