Pause your GitHub Actions workflow and request manual approval from set approvers before continuing
Find a file
Thomas Stringer fee68ac26e
Add limitations to the README (#24)
Add the specific limitations and considerations to the project
documentation. Closes #2.
2022-06-29 21:12:01 -04:00
.github/workflows Add linting (#23) 2022-06-29 21:02:36 -04:00
action.yaml Release v1.5.0 (#19) 2022-06-12 15:31:58 -04:00
approval.go Fix newline for denied (#22) 2022-06-29 20:54:06 -04:00
approval_test.go Fix newline for denied (#22) 2022-06-29 20:54:06 -04:00
approvalstatus.go initial commit 2022-03-24 20:41:13 -04:00
constants.go Adding support for custom titles. (#18) 2022-06-09 09:09:09 -04:00
Dockerfile add label for dockerfile and basic readme text 2022-03-24 20:43:13 -04:00
go.mod initial commit 2022-03-24 20:41:13 -04:00
go.sum initial commit 2022-03-24 20:41:13 -04:00
LICENSE Initial commit 2022-03-24 20:43:53 -04:00
main.go Add linting (#23) 2022-06-29 21:02:36 -04:00
Makefile Add linting (#23) 2022-06-29 21:02:36 -04:00
README.md Add limitations to the README (#24) 2022-06-29 21:12:01 -04:00

Manual Workflow Approval

ci

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:

  1. Workflow comes to the manual-approval action.
  2. manual-approval will create an issue in the containing repository and assign it to the approvers.
  3. If and once all approvers respond with an approved keyword, the workflow will continue.
  4. 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
      issue-title: "Deploying v1.3.5 to prod from staging"
  • approvers is a comma-delimited list of all required approvers.
  • minimum-approvals is an integer that sets the minimum number of approvals required to progress the workflow. Defaults to ALL approvers.
  • issue-title is a string that will be appened to the title of the issue.

Limitations

  • While the workflow is paused, it will still continue to consume a concurrent job allocation out of the max concurrent jobs
  • A job (including a paused job) will be failed after 6 hours
  • A paused job is still running compute/instance/virtual machine and will continue to incur costs