Skip to content

Commit

Permalink
Snyk Fail Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kishore7snehil committed Oct 23, 2024
1 parent eeadd3e commit 5b6baba
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ on:
- main
schedule:
- cron: "30 0 1,15 * *"
workflow_dispatch:
workflow_dispatch:
inputs:
pr_number:
description: 'Pull Request number to run the workflow on (for fork PRs)'
required: false
default: ''

permissions:
contents: read
Expand Down Expand Up @@ -54,7 +59,9 @@ jobs:

- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.ref }}
ref: |
${{ github.event.pull_request.merge_commit_sha ||
(github.event_name == 'workflow_dispatch' && inputs.pr_number != '' ? 'refs/pull/' + inputs.pr_number + '/head' : github.ref) }}
- uses: ./.github/actions/setup
with:
Expand Down

0 comments on commit 5b6baba

Please sign in to comment.