From 615f6f576f790cbb4b19009c2472675353f225c8 Mon Sep 17 00:00:00 2001 From: Martin Dimitrov Date: Sat, 7 Mar 2026 12:10:57 -0800 Subject: [PATCH] reload primary then secondary --- .gitea/workflows/gitainer-deploy.yaml | 7 ++++++- .gitea/workflows/reload-act-runner.yaml | 16 ++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/gitainer-deploy.yaml b/.gitea/workflows/gitainer-deploy.yaml index 858f689..26bfb03 100644 --- a/.gitea/workflows/gitainer-deploy.yaml +++ b/.gitea/workflows/gitainer-deploy.yaml @@ -11,10 +11,15 @@ on: required: false type: boolean default: false + runs_on_label: + description: The runner label to execute this workflow on. + required: false + type: string + default: ubuntu-22.04 jobs: deploy-gitainer: - runs-on: ubuntu-22.04 + runs-on: ${{ inputs.runs_on_label }} steps: - name: Check status step id: check-step diff --git a/.gitea/workflows/reload-act-runner.yaml b/.gitea/workflows/reload-act-runner.yaml index 0d5f224..800633f 100644 --- a/.gitea/workflows/reload-act-runner.yaml +++ b/.gitea/workflows/reload-act-runner.yaml @@ -10,12 +10,20 @@ jobs: with: files: .gitea/** - deploy-gitainer: + reload-primary: needs: diff if: ${{ needs.diff.outputs.is_changed == 'true' }} - continue-on-error: true uses: martin/chromart-gitea-actions/.gitea/workflows/gitainer-deploy.yaml@main with: stack_name: gitea_act_runner - # use this because this action kills the runner - delayed_silent: true + # the secondary runner executes the primary restart webhook + runs_on_label: runner-secondary + + reload-secondary: + needs: reload-primary + # 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