Skip to content

Commit 264fb10

Browse files
authored
ci: fix AL2 checkouts (runfinch#1146)
Signed-off-by: Justin Alvarez <[email protected]>
1 parent 2e4479a commit 264fb10

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/e2e-linux.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,12 @@ jobs:
4545
if: ${{ (startsWith(inputs.os, 'amazon') && inputs.version == '2' ) }}
4646
run: |
4747
git clone https://github.com/${GITHUB_REPOSITORY}.git .
48-
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/prh/*"
49-
git config --add remote.origin.fetch "+refs/pull/*/merge:refs/remotes/origin/prm/*"
50-
git fetch origin
48+
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
49+
git config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
50+
git config --add remote.origin.fetch "+refs/tags/*:refs/tags/*"
51+
git config --add remote.origin.fetch "+${GITHUB_SHA}:${GITHUB_REF}"
52+
fi
53+
git fetch --prune origin
5154
git checkout ${GITHUB_SHA}
5255
- name: Set output variables
5356
id: vars

0 commit comments

Comments
 (0)