chromart-gitea-actions/.gitea/workflows/gitainer-deploy.yaml
Martin Dimitrov 62b353d5f6
All checks were successful
Reload Act Runner Stack to clear cache for workflows / diff (push) Successful in 1m23s
Reload Act Runner Stack to clear cache for workflows / deploy-gitainer (push) Successful in 4s
seperate validate runner reload
2026-03-07 11:39:19 -08:00

34 lines
1.2 KiB
YAML

name: Reload Gitainer Stack
on:
workflow_call:
inputs:
stack_name:
required: true
type: string
delayed_silent:
description: Delay the webhook call using a detached container and always succeed. Used when rebuilding the runner executing the webhook.
required: false
type: boolean
default: false
jobs:
deploy-gitainer:
runs-on: ubuntu-22.04
steps:
- name: Check status step
id: check-step
if: success()
run: echo "Workflow successful"
- name: Call Gitainer stack webhooks
continue-on-error: true
run: |
if [ "${{ inputs.delayed_silent }}" = "true" ]; then
echo "Delaying the webhook call by 10s using a detached container."
echo "This gives the runner time to report job completion and clean up before it restarts."
docker run --rm -d alpine sh -c "apk add --no-cache curl && sleep 10 && curl --request POST 'http://192.168.1.150:9080/api/stacks/${{ inputs.stack_name }}?pretty'"
else
curl --request POST "http://192.168.1.150:9080/api/stacks/${{ inputs.stack_name }}?pretty"
fi