* Close issue if kill signal received * Refactor: Exiting main loop can close application without explicit call to os.Exit(0) * Leave a comment on the closed issue if the close handler is triggered * Accidentally deleted the final logging command * Fix punctuation on the closing comment * Handle the comment loop and interruption handling via channels and a select statement * Update main.go |
||
|---|---|---|
| .github/workflows | ||
| action.yaml | ||
| approval.go | ||
| approval_test.go | ||
| approvalstatus.go | ||
| constants.go | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| Makefile | ||
| README.md | ||
Manual Workflow Approval
Pause a GitHub Actions workflow and require manual approval from one or more approvers before continuing.
This is a very common feature for a deployment or release pipeline, and while this functionality is available from GitHub, it requires the use of environments and if you want to use this for private repositories then you need GitHub Enterprise. This action provides manual approval without the use of environments, and is freely available to use on private repositories.
Note: This approval duration is subject to the broader 72 hours timeout for a workflow. So keep that in mind when figuring out how quickly an approver must respond.
The way this action works is the following:
- Workflow comes to the
manual-approvalaction. manual-approvalwill create an issue in the containing repository and assign it to theapprovers.- If and once all approvers respond with an approved keyword, the workflow will continue.
- If any of the approvers responds with a denied keyword, then the workflow will exit with a failed status.
- Approval keywords - "approve", "approved", "lgtm", "yes"
- Denied keywords - "deny", "denied", "no"
These are case insensitive with optional punctuation either a period or an exclamation mark.
In all cases, manual-approval will close the initial GitHub issue.
Usage
steps:
- uses: trstringer/manual-approval@v1
with:
secret: ${{ github.TOKEN }}
approvers: user1,user2
minimum-approvals: 1
approversis a comma-delimited list of all required approvers.minimum-approvalsis an integer that sets the minimum number of approvals required to progress the workflow. Defaults to ALL approvers.