@@ -74,3 +74,30 @@ jobs:
|
||||
# cache import timed out (~30s) on every run. The Dockerfile's BuildKit
|
||||
# cache mounts still speed up dependency installs within a build.
|
||||
platforms: linux/amd64
|
||||
|
||||
# Tell Arcane to pull the freshly-pushed image and recreate the container.
|
||||
#
|
||||
# Create the webhook in Arcane: Settings -> Webhooks -> New, targeting the
|
||||
# compose PROJECT with the "update" action (pulls new images + recreates
|
||||
# changed services). Arcane shows the token (arc_wh_...) exactly once; the
|
||||
# full trigger URL is
|
||||
# https://<arcane-host>/api/webhooks/trigger/arc_wh_xxxxxxxx...
|
||||
# Store that whole URL as the Actions secret ARCANE_WEBHOOK_URL. The
|
||||
# endpoint is unauthenticated apart from the token in the path (rate-limited
|
||||
# to 60 req / 10s per IP), takes no body, and only fires on real pushes to
|
||||
# main — not on PRs, and skipped automatically if the secret is unset.
|
||||
- name: Trigger Arcane deployment
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
env:
|
||||
ARCANE_WEBHOOK_URL: ${{ secrets.ARCANE_WEBHOOK_URL }}
|
||||
run: |
|
||||
if [ -z "$ARCANE_WEBHOOK_URL" ]; then
|
||||
echo "ARCANE_WEBHOOK_URL not set; skipping deploy trigger."
|
||||
exit 0
|
||||
fi
|
||||
code=$(curl -sS -o /dev/null -w '%{http_code}' -X POST "$ARCANE_WEBHOOK_URL")
|
||||
echo "Arcane webhook responded with HTTP $code"
|
||||
case "$code" in
|
||||
2*) echo "Deployment triggered." ;;
|
||||
*) echo "::error::Arcane webhook failed (HTTP $code)"; exit 1 ;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user