Skip to content

Commit

Permalink
Update repolinter.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
deleonenriqueta authored Aug 4, 2023
1 parent c2f6b1b commit 7f7db41
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions .github/workflows/repolinter.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
# NOTE: This file should always be named `repolinter.yml` to allow
# workflow_dispatch to work properly
name: Repolinter Action

# NOTE: This workflow will ONLY check the default branch!
# Currently there is no elegant way to specify the default
# branch in the event filtering, so branches are instead
# filtered in the "Test Default Branch" step.
on: [push, workflow_dispatch]

name: Snyk Dependency Scan
on:
workflow_dispatch:
jobs:
repolint:
name: Run Repolinter
security:
runs-on: ubuntu-latest
steps:
- name: Test Default Branch
id: default-branch
uses: actions/github-script@v6
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/gradle@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
script: |
const data = await github.rest.repos.get(context.repo)
return data.data && data.data.default_branch === context.ref.split('/').slice(-1)[0]
- name: Checkout Self
if: ${{ steps.default-branch.outputs.result == 'true' }}
uses: actions/checkout@v3
- name: Run Repolinter
if: ${{ steps.default-branch.outputs.result == 'true' }}
uses: newrelic/repolinter-action@v1
with:
config_url: https://raw.githubusercontent.com/newrelic/.github/main/repolinter-rulesets/community-project.yml
output_type: issue
args: --severity-threshold=high --all-sub-projects

0 comments on commit 7f7db41

Please sign in to comment.