Skip to content

Commit

Permalink
Merge pull request puppetlabs#2210 from puppetlabs/snyk_monitor_main
Browse files Browse the repository at this point in the history
(PA-4317) Snyk monitor pushes to 6.x and main
  • Loading branch information
mhashizume committed Mar 16, 2022
2 parents 13859ca + 0091bca commit 472a2e8
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/snyk_monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Snyk Monitor
on:
push:
branches:
- main
- 6.x

jobs:
snyk_monitor:
if: ${{ github.repository_owner == 'puppetlabs' }}
runs-on: ubuntu-latest
name: Snyk Monitor
steps:
- name: Checkout current PR
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install dependencies
run: bundle install --jobs 3 --retry 3
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF_NAME})"
id: extract_branch
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/ruby@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_PE_TOKEN }}
with:
command: monitor
args: --org=puppet-enterprise --project-name=${{ github.repository }} --target-reference ${{ steps.extract_branch.outputs.branch }}

0 comments on commit 472a2e8

Please sign in to comment.