Skip to content

Commit 2d72a1e

Browse files
Merge pull request #55 from AmanChh/master
Using temp branch to push the GitHub actions changes
2 parents e3fff0e + fa9f403 commit 2d72a1e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/update_tag.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ jobs:
1313
uses: actions/checkout@v3
1414
with:
1515
fetch-depth: 0
16-
- name: Set up Go v1.21.4
17-
uses: actions/setup-go@v5
18-
with:
19-
go-version: '1.21.4'
2016
- name: Get tag and set version on release
2117
if: startsWith(github.ref, 'refs/tags/v')
2218
run: |
@@ -29,14 +25,17 @@ jobs:
2925
VERSION="${GITHUB_SHA::7}"
3026
fi
3127
echo "VERSION=$VERSION" | tee -a "$GITHUB_ENV"
28+
- name: Checkout branch
29+
if: startsWith(github.ref, 'refs/tags/v')
30+
run: git checkout -B temp_branch
3231
- name: Bump version on release [${{ env.VERSION }}]
3332
if: startsWith(github.ref, 'refs/tags/v')
3433
run: |
3534
git config user.name "${{ github.actor }}"
3635
git config user.email "${{ github.actor }}@users.noreply.github.com"
3736
if [[ $(git diff version.go) != "" ]]; then
38-
git checkout master
3937
git add version.go
4038
git commit -m "[CI] Bump version to $VERSION"
41-
git push
39+
git pull origin master
40+
git push origin temp_branch:master
4241
fi

0 commit comments

Comments
 (0)