Skip to content

Commit dca5daf

Browse files
committed
Fix GitHub Actions workflows to checkout from PR head repository
1 parent ebe4877 commit dca5daf

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/build-and-push.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
14-
- name: git fetch
15-
run: |
16-
git fetch
17-
- name: git checkout
18-
run: |
19-
git checkout ${{ github.head_ref }}
13+
with:
14+
ref: ${{ github.head_ref }}
15+
repository: ${{ github.head_repo.full_name }}
2016

2117
- name: Set up Docker Buildx
2218
uses: docker/setup-buildx-action@v3

.github/workflows/tests.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ jobs:
99
tox:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
13+
with:
14+
ref: ${{ github.head_ref }}
15+
repository: ${{ github.head_repo.full_name }}
1316

1417
- name: build tox container
1518
run: |
@@ -21,6 +24,9 @@ jobs:
2124
runs-on: ubuntu-latest
2225
steps:
2326
- uses: actions/checkout@v4
27+
with:
28+
ref: ${{ github.head_ref }}
29+
repository: ${{ github.head_repo.full_name }}
2430
- name: Install dependencies
2531
run: npm ci
2632
- name: Run tests

0 commit comments

Comments
 (0)