File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,22 @@ jobs:
4141 fail-fast : false
4242 runs-on : ubuntu-22.04
4343 steps :
44- - name : checkout
44+ - name : clone
4545 run : |
4646 # can't use actions/checkout here as transferring the shallow clone fails when using upload-/download-artifact
47- git clone https://token:[email protected] /$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 }}
5060 - name : Set up Go
5161 uses : actions/setup-go@v5
5262 with :
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ go run ./pip/generate
3535TAG=v0.0.0-$PYTHON_VERSION -$PYTHON_STANDALONE_VERSION -$BUILD_NUM
3636
3737echo " checking out temporary branch"
38- git checkout $( git rev-parse HEAD )
38+ git checkout --detach
3939git add -f python/internal/data
4040git add -f pip/internal/data
4141git commit -m " added python $PYTHON_VERSION from python-standalone $PYTHON_STANDALONE_VERSION "
You can’t perform that action at this time.
0 commit comments