fix: Update version info #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push | |
# https://docs.github.com/en/graphql/reference/objects#commit | |
name: 📝 Issue template update | |
on: | |
push: | |
branches: | |
- "release/v*" | |
jobs: | |
version_update: | |
name: Version update | |
# 브런치 생성 확인 | |
if: github.event.created == true | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # for git commit | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set env | |
run: | | |
echo "BRANCH_NAME=$(sed 's/refs\/heads\///' <<< ${{ github.event.ref }})" >> "$GITHUB_ENV" | |
echo "CUR_VERSION=$(sed 's/refs\/heads\/release\/v//' <<< ${{ github.event.ref }})" >> "$GITHUB_ENV" | |
- name: Update version | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for gh cli | |
BUG_REPORT_TEM: bug-report.yml | |
run: | | |
bash .github/scripts/issue-template-update/version-update.sh "$BUG_REPORT_TEM" | |
- name: Commit templates | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --global user.email ${{ github.event.pusher.email }} | |
git config --global user.name ${{ github.event.pusher.name }} | |
git add .github/ISSUE_TEMPLATE | |
git commit -m "release: v$CUR_VERSION" | |
git push |