Updated script to create, update and close github issues
Signed-off-by: Harry Hogg <hhogg@spotify.com>
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
name: Create and Update Github Issues from Snyk report
|
||||
|
||||
on:
|
||||
[push, pull_request]
|
||||
# workflow_dispatch:
|
||||
# pull_request:
|
||||
# schedule:
|
||||
# - cron: '0 */4 * * *' # every 4 hours
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Run Snyk to check for vulnerabilities
|
||||
uses: snyk/actions/node@master
|
||||
continue-on-error:
|
||||
env:
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
with:
|
||||
args: --yarn-workspaces --strict-out-of-sync=false
|
||||
json: true
|
||||
|
||||
- name: Run the Snyk Github Issue command
|
||||
run: yarn ts-node scripts/snyk-github-issue-sync.ts
|
||||
@@ -43,9 +43,14 @@ jobs:
|
||||
--org=backstage-dgh
|
||||
--strict-out-of-sync=false
|
||||
--sarif-file-output=snyk.sarif
|
||||
--json-file-output=snyk.json
|
||||
json: true
|
||||
env:
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
- name: Upload Snyk report
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
with:
|
||||
sarif_file: snyk.sarif
|
||||
|
||||
- name: Update Github issues
|
||||
run: yarn ts-node scripts/snyk-github-issue-sync.ts
|
||||
|
||||
Reference in New Issue
Block a user