@@ -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