Skip to content

Commit 10f8886

Browse files
committed
chore: fix actions/checkout bug
ref: actions/checkout#518
1 parent 7004aa2 commit 10f8886

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
steps:
3737
- name: Checkout repository
3838
uses: actions/checkout@v3
39+
with:
40+
ref: "refs/pull/${{ github.event.number }}/merge"
3941

4042
# Initializes the CodeQL tools for scanning.
4143
- name: Initialize CodeQL

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212

1313
- name: Checkout
1414
uses: actions/checkout@v3
15-
16-
- name: Unshallow
17-
run: git fetch --prune --unshallow
15+
with:
16+
fetch-depth: 0
17+
ref: "refs/pull/${{ github.event.number }}/merge"
1818

1919
- name: Install semantic-release
2020
run: yarn global add --no-progress --non-interactive "semantic-release" "@semantic-release/exec"
@@ -31,9 +31,9 @@ jobs:
3131
steps:
3232
- name: Checkout
3333
uses: actions/checkout@v3
34-
35-
- name: Unshallow
36-
run: git fetch --prune --unshallow
34+
with:
35+
fetch-depth: 0
36+
ref: "refs/pull/${{ github.event.number }}/merge"
3737

3838
- name: Set up Go
3939
uses: actions/setup-go@v2.1.4

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222

2323
- name: Checkout
2424
uses: actions/checkout@v3
25+
with:
26+
fetch-depth: 0
2527

2628
- name: golangci-lint
2729
uses: golangci/golangci-lint-action@v2.5.2
@@ -41,6 +43,8 @@ jobs:
4143

4244
- name: Checkout
4345
uses: actions/checkout@v3
46+
with:
47+
ref: "refs/pull/${{ github.event.number }}/merge"
4448

4549
- name: Test
4650
run: go test -coverprofile cover.out ./...

0 commit comments

Comments
 (0)