Compare commits
1 Commits
66734923cb
...
v0.0.31
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6f705486d |
@@ -17,10 +17,14 @@ jobs:
|
||||
cd $GITHUB_WORKSPACE
|
||||
git init
|
||||
git remote add origin ${{ github.server_url }}/${{ github.repository }}.git
|
||||
git fetch origin ${{ github.ref }}
|
||||
|
||||
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
||||
git checkout ${{ github.ref_name }}
|
||||
# For tags, fetch the specific tag and checkout the commit it points to
|
||||
git fetch origin ${{ github.ref }}:refs/tags/${{ github.ref_name }}
|
||||
git checkout refs/tags/${{ github.ref_name }}
|
||||
else
|
||||
# For branches, fetch and checkout with tracking
|
||||
git fetch origin ${{ github.ref_name }}:refs/remotes/origin/${{ github.ref_name }}
|
||||
git checkout -b ${{ github.ref_name }} origin/${{ github.ref_name }}
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user