CI/CD · Deploy gate · On request
Zof deploy gate for GitHub Actions
A GitHub Actions job can run the Zof deploy gate before a deploy. The gate asks Zof whether the commit may ship to that environment, and stops the deploy unless Zof allows it.
On request
What it does
- Before a deploy, the job asks Zof whether this commit may ship to this environment. Zof answers from the checks on the commit’s pull request, the same checks the Zof / Control check on GitHub shows.
- Allowed: the step passes and the deploy continues. Blocked: the step fails, and the log lists each reason with a link to the change in Zof.
- Waiting: a check is still running or an approval is needed, and the step waits up to your company’s limits.
- If Zof cannot answer, the step fails and the deploy stops. There is no fail-open mode.
- Break-glass deploys whatever the verdict, with a reason you give and a separate token an admin issues, and Zof records it.
Set it up in GitHub Actions
- Ask us to switch the gate on for your company. Settings › Pipeline tokens then appears in the console. You need to be a company admin, with the repository on GitHub and connected through the Zof GitHub App.
- In the console, open Settings › Pipeline tokens, choose Create token, pick where it can deploy and copy the token. Zof shows it only once.
- Save the token in GitHub Actions as a repository or environment secret, named ZOF_GATE_TOKEN. Never paste it into a pipeline file.
- Add the gate as a step in your deploy job, before the deploy itself.
- Run the deploy job on a commit from a pull request Zof checked. The log starts with "Zof gate:" and ends with Zof’s answer and a link to the change.
- uses: zof-ai/gate@v1
with:
environment: production
token: ${{ secrets.ZOF_GATE_TOKEN }}Read the full setup guide
The console help covers settings, troubleshooting and what each result means.