Skip to content

Commit

Permalink
Merge pull request #55 from AmanChh/master
Browse files Browse the repository at this point in the history
Using temp branch to push the GitHub actions changes
  • Loading branch information
SANJEEV-Choubey authored Apr 5, 2024
2 parents e3fff0e + fa9f403 commit 2d72a1e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/update_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go v1.21.4
uses: actions/setup-go@v5
with:
go-version: '1.21.4'
- name: Get tag and set version on release
if: startsWith(github.ref, 'refs/tags/v')
run: |
Expand All @@ -29,14 +25,17 @@ jobs:
VERSION="${GITHUB_SHA::7}"
fi
echo "VERSION=$VERSION" | tee -a "$GITHUB_ENV"
- name: Checkout branch
if: startsWith(github.ref, 'refs/tags/v')
run: git checkout -B temp_branch
- name: Bump version on release [${{ env.VERSION }}]
if: startsWith(github.ref, 'refs/tags/v')
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
if [[ $(git diff version.go) != "" ]]; then
git checkout master
git add version.go
git commit -m "[CI] Bump version to $VERSION"
git push
git pull origin master
git push origin temp_branch:master
fi

0 comments on commit 2d72a1e

Please sign in to comment.