File tree 2 files changed +15
-5
lines changed
2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,22 @@ jobs:
41
41
fail-fast : false
42
42
runs-on : ubuntu-22.04
43
43
steps :
44
- - name : checkout
44
+ - name : clone
45
45
run : |
46
46
# can't use actions/checkout here as transferring the shallow clone fails when using upload-/download-artifact
47
- git clone https://token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY . --depth=1
48
- env :
49
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47
+ git clone https://github.com/$GITHUB_REPOSITORY . --depth=1
48
+ - name : checkout PR
49
+ if : ${{ github.event_name == 'pull_request' }}
50
+ run : |
51
+ echo fetching pull/${{ github.ref_name }}
52
+ git fetch origin pull/${{ github.ref_name }}:pr --depth=1
53
+ git checkout pr
54
+ - name : checkout branch
55
+ if : ${{ github.event_name == 'push' }}
56
+ run : |
57
+ echo fetching ${{ github.ref_name }}
58
+ git fetch origin ${{ github.ref_name }} --depth=1
59
+ git checkout ${{ github.ref_name }}
50
60
- name : Set up Go
51
61
uses : actions/setup-go@v5
52
62
with :
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ go run ./pip/generate
35
35
TAG=v0.0.0-$PYTHON_VERSION -$PYTHON_STANDALONE_VERSION -$BUILD_NUM
36
36
37
37
echo " checking out temporary branch"
38
- git checkout $( git rev-parse HEAD )
38
+ git checkout --detach
39
39
git add -f python/internal/data
40
40
git add -f pip/internal/data
41
41
git commit -m " added python $PYTHON_VERSION from python-standalone $PYTHON_STANDALONE_VERSION "
You can’t perform that action at this time.
0 commit comments