Open github-learning-lab[bot] opened 3 years ago
Great job creating a new workflow!
As we briefly discussed earlier, workflows can be configured to run:
Full details are available in Events that trigger workflows on GitHub Help. So far, we've used the push
event for our Node.js workflow. That makes sense when we want to take action on code changes to our repository.
For a review workflow, we want to engage with human reviews, instead. For example, we'll use the Label approved pull requests action so that we can easily see when we've gotten enough reviews to merge a pull request.
Let's prep our review workflow by triggering it with a pull_request_review
event.
Great work! Let's get some more practice with jobs. Apply the suggested change below or follow the instructions.
In a later step, we'll use an action that adds a label to any pull requests after a preset number of approvals. These labels could be used as a visual indicator to your team that something is ready to merge, or even as a way to use other actions or tools to automatically merge pull requests when they receive the required number of approvals.
Partial workflow
Remember the custom workflow we are attempting to create for the team? Here's our status on the list of requirements we defined:
main
branch can't be deleted or inadvertently brokenThe last three remaining items don't really belong in a
code, build, and test
pipeline because they have to do with processes that involve humans.Step 14: Automate the review process
GitHub Actions can run multiple workflows for different event triggers. Let's create a new approval workflow that'll work together with our Node.js workflow.
:keyboard: Activity: Add a new workflow file to automate the team's review process
.github/workflows/approval-workflow.yml
, on this branchI'll respond when you commit to this branch.