Skip to content

feat: add trigger-coolify-deploy composite action - #4

Merged
Andreas-Garcia merged 1 commit into
mainfrom
feature/trigger-coolify-deploy-action
Aug 8, 2026
Merged

feat: add trigger-coolify-deploy composite action#4
Andreas-Garcia merged 1 commit into
mainfrom
feature/trigger-coolify-deploy-action

Conversation

@Andreas-Garcia

Copy link
Copy Markdown
Member

Summary

  • New .github/actions/trigger-coolify-deploy composite action: trigger a Coolify application deploy via API, poll it to a terminal status (finished/failed/cancelled-by-user), and optionally HTTP health-check it before returning.
  • Supports PR-preview deploys (pr_number) with retry-on-"not found" to tolerate the race against Coolify's own webhook-driven preview creation.

Motivation

Part of a 3-repo change (github-workflowsthe-music-deck-admininfrastructure) to replace Coolify's native, unordered git-push auto-deploy with GitHub-Actions-orchestrated deploy ordering for tmd-admin-api/tmd-admin-web. The VPS runs Coolify with a single concurrent build slot; tmd-admin-web's build makes a live fetch to tmd-admin-api during next build, so an unordered auto-deploy can deadlock or serve a stale/unhealthy sibling. This action is the shared building block both deploy-api-and-web.yml (api-then-web) jobs will call.

Landing this first per the plan's merge order — no consumers yet.

Changes

  • .github/actions/trigger-coolify-deploy/action.yml: new composite action (mirrors sync-env-to-coolify's app-uuid resolution pattern).
  • README.md: documents the new action (inputs table + usage example).
  • CHANGELOG.md: entry under [Unreleased]### Added.

Test plan

  • action.yml YAML parses; embedded bash passes bash -n.
  • Confirmed actionlint doesn't apply to action.yml composite-action files in this repo (fails identically on the pre-existing, merged sync-env-to-coolify/action.yml).
  • No live Coolify API to test against directly in this PR — will be exercised end-to-end when the-music-deck-admin's deploy-api-and-web.yml (next PR in the sequence) calls it against real staging/PR-preview apps.

Next steps

After merge, a maintainer runs .github/scripts/release.sh minor to cut v4.2.0 (current latest tag is v4.1.0), which the-music-deck-admin's workflow will pin to.

Lets callers deploy a Coolify app via API, poll it to a terminal
status, and optionally health-check it before returning — used to
enforce cross-app deploy ordering (api before web) from GitHub
Actions instead of Coolify's native, unordered git-push auto-deploy,
which can deadlock/race under a single concurrent build slot.
Copilot AI lite review requested due to automatic review settings August 8, 2026 14:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new reusable composite GitHub Action for orchestrating Coolify deployments from GitHub Actions, enabling ordered multi-app deploys (e.g., API before web) by triggering a deploy via Coolify’s API, polling for completion, and optionally performing an HTTP health check.

Changes:

  • Added a new composite action .github/actions/trigger-coolify-deploy to trigger and wait for Coolify deployments (with optional PR-preview retry + health check).
  • Documented the new action in README.md with inputs and a usage example.
  • Added an [Unreleased] changelog entry describing the new action and its motivation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/actions/trigger-coolify-deploy/action.yml Adds composite action that triggers Coolify deploys, polls terminal status, and optionally health-checks.
README.md Documents the new composite action (inputs + example usage).
CHANGELOG.md Records the new action under [Unreleased]### Added.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +209 to +212
health_url="${base_url%/}${HEALTH_CHECK_PATH}"
echo "Health-checking ${health_url} (timeout ${POLL_TIMEOUT_SECONDS}s)..."
start=$(date +%s)
while :; do
@Andreas-Garcia
Andreas-Garcia merged commit d14d3d7 into main Aug 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants