Skip to content

Commit

Permalink
Use SHA rather than branch names in checkout action
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Aug 25, 2023
1 parent d27b154 commit 7e42e84
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Run ShellCheck
uses: ludeeus/[email protected]
env:
Expand All @@ -36,7 +36,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Install additional packages
run: |
set -ex
Expand All @@ -54,7 +54,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Install additional packages
run: |
set -ex
Expand All @@ -77,7 +77,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Install additional packages
run: |
set -ex
Expand All @@ -97,7 +97,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Install additional packages
run: |
set -ex
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
submodules: true
- name: Build Docker image
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
submodules: true
- name: Test Lua command-line interface
Expand Down

0 comments on commit 7e42e84

Please sign in to comment.