Skip to content

Commit

Permalink
update image tag in branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-bisonai committed May 27, 2024
1 parent 9b0b764 commit 2a51fb7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/image+upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Determine the current branch
id: determine_branch
run: |
branch=$(git branch -r --contains $GITHUB_SHA | grep -v '\->' | grep -E 'origin/(main|master|develop|feature|fix)' | head -n 1 | sed 's|origin/||')
echo "branch=$branch" >> $GITHUB_ENV
echo "Determined branch: $branch"
- name: update package.json version
if: needs.prepare.outputs.version
Expand All @@ -145,7 +154,7 @@ jobs:
git config --global user.email '[email protected]'
git add package.json
git commit -m "chore: update package.json version to ${{ needs.prepare.outputs.version }}"
git push
git push origin HEAD:${{ env.branch }}
post-slack-tag-update-success:
name: Post slack message for tag update success
Expand Down

0 comments on commit 2a51fb7

Please sign in to comment.