Pause your GitHub Actions workflow and request manual approval from set approvers before continuing
Find a file
Thomas Stringer 771ebb5e80 fix workflow
2022-03-25 21:31:42 -04:00
.github/workflows fix workflow 2022-03-25 21:31:42 -04:00
action.yaml initial commit 2022-03-24 20:41:13 -04:00
approval.go initial commit 2022-03-24 20:41:13 -04:00
approval_test.go initial commit 2022-03-24 20:41:13 -04:00
approvalstatus.go initial commit 2022-03-24 20:41:13 -04:00
constants.go initial commit 2022-03-24 20:41:13 -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 initial commit 2022-03-24 20:41:13 -04:00
Makefile add workflow and readme 2022-03-25 21:28:51 -04:00
README.md add workflow and readme 2022-03-25 21:28:51 -04:00

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:

  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 "Approved", the workflow will continue.
  4. If any of the approvers responds with "Denied", then the workflow will exit with a failed status.

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

approvers is a comma-delimited list of all required approvers.