Integrating Snyk Analysis Tool #5
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
name: Snyk Test | |
on: | |
pull_request: | |
branches: | |
- f24 | |
workflow_call: # Usually called from deploy | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
checks: write # for coverallsapp/github-action to create new checks | |
contents: read # for actions/checkout to fetch code | |
jobs: | |
snyk: | |
runs-on: ubuntu-latest | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} # Ensure your token is added as a secret in GitHub | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: NPM Install | |
uses: bahmutov/npm-install@v1 | |
with: | |
useLockFile: false | |
- name: Run Snyk Test | |
run: npx snyk test | |