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