forked from metalstormbass/goof
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from morgansnyk/testaction
joe's version
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "Snyk Noti Test" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
# Update to master branch | ||
- master | ||
|
||
jobs: | ||
prCheck: | ||
# Confirm PR Check status | ||
runs-on: ubuntu-latest | ||
outputs: | ||
output1: ${{ steps.step1.outputs.status }} | ||
|
||
steps: | ||
# Checks the status of Snyk PR Checks | ||
- name: 'Wait for status checks' | ||
id: waitforstatuschecks | ||
uses: "WyriHaximus/github-action-wait-for-status@v2" | ||
with: | ||
ignoreActions: ## Note that these names are the human readable names use as status on commits, and show up as status checks on PRs. | ||
checkInterval: 13 | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: 'Set Failed status' | ||
id: step1 | ||
if: steps.waitforstatuschecks.outputs.status == 'failed' | ||
run: echo "status=failed" >> "$GITHUB_OUTPUT" | ||
|
||
prReviewer: | ||
# Add AppSec Reviewer if PR check failed | ||
needs: prCheck | ||
if: needs.prCheck.outputs.output1 == 'failed' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Add Reviewers | ||
uses: madrapps/add-reviewers@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
reviewers: john,kramer,seinfeld | ||
re-request-when-approved: true | ||
re-request-when-changes-requested: true |