Skip to content

Commit

Permalink
update Checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
developerkunal committed Oct 23, 2024
1 parent 209bff3 commit 56925a7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ on:
workflow_dispatch:
inputs:
pr_number:
description: 'Pull Request number to run the workflow on (for fork PRs)'
description: "Pull Request number to run the workflow on (for fork PRs)"
required: false
default: ''
default: ""

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

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

- uses: ./.github/actions/setup
with:
Expand Down

0 comments on commit 56925a7

Please sign in to comment.