Skip to content

Commit

Permalink
Update create-tag.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
cubxxw authored Nov 3, 2023
1 parent 094d9d6 commit 32f6eeb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/create-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ jobs:
- name: Create Tag
run: |
COMMENT_BODY="${{ github.event.comment.body }}"
TAG=$(echo $COMMENT_BODY | cut -d' ' -f3)
COMMENT=$(echo $COMMENT_BODY | cut -d' ' -f4-)
TAG=$(echo $COMMENT_BODY | awk '{print $3}')
COMMENT=$(echo $COMMENT_BODY | awk '{$1=$2=$3=""; print $0}')
COMMENT=$(echo $COMMENT | sed 's/^ *//;s/ *$//') # Remove leading and trailing whitespaces
echo "Creating tag $TAG with comment '$COMMENT'"
git config user.name "GitHub Action"
git config user.email "[email protected]"
git tag -a $TAG -m "$COMMENT"
git push origin $TAG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}

0 comments on commit 32f6eeb

Please sign in to comment.