Skip to content

Commit e4e5879

Browse files
committed
fix: split checkout for pr and push
1 parent 4b6371a commit e4e5879

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,21 @@ jobs:
4747
env:
4848
CARGO_FLAGS: --verbose --locked
4949
steps:
50-
- name: Checkout code
50+
- name: Checkout code on PR
5151
#Workaround for the running out of disk space issue. See https://github.com/actions/runner-images/issues/1341
5252
run: |
5353
mkdir C:\\${{ github.event.repository.name }}
5454
git clone -n -v --progress https://github.com/input-output-hk/${{ github.event.repository.name }}.git C:\\${{ github.event.repository.name }}
5555
cd C:\\${{ github.event.repository.name }}
5656
git checkout ${{ github.event.pull_request.head.sha }}
57+
if: github.event_name == 'pull_request'
58+
59+
- name: Checkout code on push
60+
run: |
61+
mkdir C:\\${{ github.event.repository.name }}
62+
git clone -v --progress https://github.com/input-output-hk/${{ github.event.repository.name }}.git C:\\${{ github.event.repository.name }}
63+
cd C:\\${{ github.event.repository.name }}
64+
if: github.event_name == 'push'
5765

5866
- name: Allow long paths on Windows
5967
working-directory: "C:\\${{ github.event.repository.name }}"

0 commit comments

Comments
 (0)