Skip to content

GitHub Actions

Connecting a GitHub organisation to Patrol lets it trigger GitHub Actions workflows for deployments, install workflow files via pull requests, and surface run status directly in deployment history.

From Settings → GitHub → Connect GitHub:

  1. Patrol redirects you to GitHub to install the Patrol GitHub App on your organisation (or personal account).
  2. Choose which repositories to grant access to — all repositories or specific ones.
  3. After approving, GitHub redirects back to Patrol and saves the installation.

Settings GitHub page showing the connected GitHub account

The connected organisation appears with its name and avatar. If you need to grant access to additional repositories later, click Manage on GitHub to open the app’s installation settings.

Using GitHub Actions as a deployment trigger

Section titled “Using GitHub Actions as a deployment trigger”

Once GitHub is connected, set GitHub Actions as the trigger type in a service template:

  1. Open the service template and go to Deployment config.
  2. Set Trigger type to GitHub Actions.
  3. Enter the repository (org/repo) and workflow file name (e.g. deploy.yml).
  4. Add any inputs the workflow expects — these can reference secret parameters from the parameter schema.

Service template deployment config with GitHub Actions selected, showing the repository, workflow file, and git ref fields

When a deployment runs, Patrol dispatches a workflow_dispatch event with the configured inputs. For async workflows, it polls the run until completion and updates the deployment run status automatically.

If the repository doesn’t already have a deployment workflow, Patrol can create one via a pull request:

  1. In the service template’s deployment config, click Install workflow.
  2. Patrol opens a PR into the repository with a starter deploy.yml.
  3. Review and merge the PR. Patrol detects the merge and confirms the file is in place.

Service template deployment config showing GitHub Actions trigger configuration

For environments using Terraform (or another plan-based tool), Patrol can run drift checks through GitHub Actions in plan-only mode — checking what would change without applying anything.

  1. Set up a cloud account and adopt a baseline (see Drift Detection).
  2. On the cloud account, click Install drift check workflow and choose the repository.
  3. Patrol opens a PR with a patrol-drift.yml workflow that runs with PATROL_MODE=drift_check set.

Scheduled drift checks trigger this workflow rather than a full deployment.

From Settings → GitHub, click Disconnect. This removes the stored installation token from Patrol. The GitHub App itself remains installed on your GitHub organisation until you uninstall it from GitHub → Organisation Settings → GitHub Apps.