Add Slack notification
This commit is contained in:
14
.github/workflows/close-milestone-on-release.yml
vendored
14
.github/workflows/close-milestone-on-release.yml
vendored
@@ -22,14 +22,24 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: Close Milestone
|
||||
id: milestone-id
|
||||
run: |
|
||||
TAG=${{ inputs.releaseTag }}
|
||||
export MILESTONE_NAME=${TAG#v}
|
||||
MILESTONE_ID=$(gh api repos/$OWNER/$REPO/milestones --jq '.[] | select(.title == env.MILESTONE_NAME) | .number')
|
||||
gh api -X PATCH repos/$OWNER/$REPO/milestones/$MILESTONE_ID -f state='closed' --silent
|
||||
if [ $MILESTONE_ID ]; then
|
||||
gh api -X PATCH repos/$OWNER/$REPO/milestones/$MILESTONE_ID -f state='closed' --silent
|
||||
fi
|
||||
echo version=$MILESTONE_NAME >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
|
||||
|
||||
- name: Announce Release on Slack
|
||||
uses: slackapi/slack-github-action@v1.24.0
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_SLACK_WEBHOOK_URL }}
|
||||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
||||
with:
|
||||
slack-message: ${{ github.event.repository.name }}-announcing `${{ steps.milestone-id.outputs.version }}`
|
||||
|
||||
Reference in New Issue
Block a user