Some checks failed
Reload Act Runner Stack to clear cache for workflows / reload-secondary (push) Blocked by required conditions
Reload Act Runner Stack to clear cache for workflows / diff (push) Successful in 1m26s
Reload Act Runner Stack to clear cache for workflows / reload-primary (push) Successful in 58s
Reload Act Runner Stack to clear cache for workflows / pull-cache-primary (push) Has been cancelled
Reload Act Runner Stack to clear cache for workflows / pull-cache-secondary (push) Has been cancelled
47 lines
1.6 KiB
YAML
47 lines
1.6 KiB
YAML
name: Reload Act Runner Stack to clear cache for workflows
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
diff:
|
|
uses: martin/chromart-gitea-actions/.gitea/workflows/diff-output.yaml@main
|
|
with:
|
|
files: .gitea/**
|
|
|
|
reload-primary:
|
|
needs: diff
|
|
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
|
uses: martin/chromart-gitea-actions/.gitea/workflows/gitainer-deploy.yaml@main
|
|
with:
|
|
stack_name: gitea_act_runner
|
|
# the secondary runner executes the primary restart webhook
|
|
runs_on_label: runner-secondary
|
|
|
|
reload-secondary:
|
|
needs: [diff, reload-primary]
|
|
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
|
# ensuring the primary actually survived and restarted successfully
|
|
uses: martin/chromart-gitea-actions/.gitea/workflows/gitainer-deploy.yaml@main
|
|
with:
|
|
stack_name: gitea_act_runner_secondary
|
|
# the primary runner executes the secondary restart webhook
|
|
runs_on_label: runner-primary
|
|
|
|
pull-cache-primary:
|
|
needs: [diff, reload-secondary]
|
|
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
|
# Use the primary runner (which is now done restarting secondary) to prove it's alive and pull cache
|
|
uses: martin/chromart-gitea-actions/.gitea/workflows/pull-cache.yaml@main
|
|
with:
|
|
runs_on_label: runner-primary
|
|
|
|
pull-cache-secondary:
|
|
needs: [diff, pull-cache-primary]
|
|
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
|
# Use the secondary runner (which is now done restarting) to prove it's alive and pull cache
|
|
uses: martin/chromart-gitea-actions/.gitea/workflows/pull-cache.yaml@main
|
|
with:
|
|
runs_on_label: runner-secondary
|