Skip to content

Commit c5039ea

Browse files
committed
fix ci
1 parent 6998a50 commit c5039ea

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

.github/workflows/examples_matrix.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,27 @@ jobs:
4343
container:
4444
image: ${{ matrix.swift.image }}
4545
steps:
46-
- name: Checkout repository
47-
# GitHub checkout action has a dep on NodeJS 20 which is not running on Amazonlinux2
48-
# workaround is to manually checkout the repository
49-
# https://github.com/actions/checkout/issues/1487
5046

51-
# uses: actions/checkout@v4
52-
# with:
53-
# persist-credentials: false
47+
# GitHub checkout action has a dep on NodeJS 20 which is not running on Amazonlinux2
48+
# workaround is to manually checkout the repository
49+
# https://github.com/actions/checkout/issues/1487
50+
- name: Manually Clone repository and checkout PR
51+
env:
52+
PR_NUMBER: ${{ github.event.pull_request.number }}
5453
run: |
55-
git clone https://github.com/${{ github.repository }}
56-
cd ${{ github.event.repository.name }}
57-
git checkout ${{ github.ref }}
54+
# Clone the repository
55+
git clone https://github.com/${{ github.repository }}.git .
56+
57+
# Fetch the pull request
58+
git fetch origin +refs/pull/$PR_NUMBER/merge:
59+
60+
# Checkout the pull request
61+
git checkout -qf FETCH_HEAD
62+
63+
# - name: Checkout repository
64+
# uses: actions/checkout@v4
65+
# with:
66+
# persist-credentials: false
5867

5968
- name: Mark the workspace as safe
6069
working-directory: ${{ github.event.repository.name }} # until we can use action/checkout@v4

0 commit comments

Comments
 (0)