Skip to content

Commit

Permalink
fix: Checkout correct branch
Browse files Browse the repository at this point in the history
  • Loading branch information
codablock committed Jun 17, 2024
1 parent daca3d1 commit 421798e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,22 @@ jobs:
fail-fast: false
runs-on: ubuntu-22.04
steps:
- name: checkout
- name: clone
run: |
# can't use actions/checkout here as transferring the shallow clone fails when using upload-/download-artifact
git clone https://token:[email protected]/$GITHUB_REPOSITORY . --depth=1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
git clone https://github.com/$GITHUB_REPOSITORY . --depth=1
- name: checkout PR
if: ${{ github.event_name == 'pull_request' }}
run: |
echo fetching pull/${{ github.ref_name }}
git fetch origin pull/${{ github.ref_name }}:pr --depth=1
git checkout pr
- name: checkout branch
if: ${{ github.event_name == 'push' }}
run: |
echo fetching ${{ github.ref_name }}
git fetch origin ${{ github.ref_name }} --depth=1
git checkout ${{ github.ref_name }}
- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion hack/build-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ go run ./pip/generate
TAG=v0.0.0-$PYTHON_VERSION-$PYTHON_STANDALONE_VERSION-$BUILD_NUM

echo "checking out temporary branch"
git checkout $(git rev-parse HEAD)
git checkout --detach
git add -f python/internal/data
git add -f pip/internal/data
git commit -m "added python $PYTHON_VERSION from python-standalone $PYTHON_STANDALONE_VERSION"
Expand Down

0 comments on commit 421798e

Please sign in to comment.