Skip to content

Commit 7eea379

Browse files
MishaKavclaude
andauthored
refactor: use shared slack-notification action (#437)
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 92d0e81 commit 7eea379

File tree

1 file changed

+10
-22
lines changed

1 file changed

+10
-22
lines changed

.github/workflows/create-tag-on-merge.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -118,25 +118,13 @@ jobs:
118118
git commit -m "Update v2-lite to $NEW_TAG"
119119
git push origin v2-lite
120120
121-
- name: Success Slack Notification
122-
if: steps.should-deploy.outputs.result == 'true' && success()
123-
uses: rtCamp/action-slack-notify@v2
124-
env:
125-
MSG_MINIMAL: true
126-
SLACK_WEBHOOK: ${{ env.SLACK_WEBHOOK }}
127-
SLACK_TITLE: ${{ github.repository }}
128-
SLACK_FOOTER: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow run> | <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ env.NEW_TAG }}|${{ env.NEW_TAG }}>
129-
SLACK_MESSAGE: |
130-
Released `${{ env.NEW_TAG }}` to `gitstream-github-action`
131-
${{ steps.should-deploy.outputs.release-notes }}
132-
133-
- name: Failure Slack Notification
134-
if: steps.should-deploy.outputs.result == 'true' && failure()
135-
uses: rtCamp/action-slack-notify@v2
136-
env:
137-
MSG_MINIMAL: true
138-
SLACK_WEBHOOK: ${{ env.SLACK_WEBHOOK }}
139-
SLACK_TITLE: ${{ github.repository }}
140-
SLACK_COLOR: ${{ job.status }}
141-
SLACK_FOOTER: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow run>
142-
SLACK_MESSAGE: Failed to release `${{ env.NEW_TAG }}` to `gitstream-github-action`
121+
- name: Slack Notification
122+
if: steps.should-deploy.outputs.result == 'true' && always()
123+
uses: linear-b/shared-workflows/.github/actions/slack-notification@develop
124+
with:
125+
status: ${{ job.status }}
126+
webhook_url: ${{ env.SLACK_WEBHOOK }}
127+
footer_links: <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ env.NEW_TAG }}|${{ env.NEW_TAG }}>
128+
message: |
129+
${{ job.status == 'success' && 'Released' || 'Failed to release' }} `${{ env.NEW_TAG }}` to `gitstream-github-action`
130+
${{ job.status == 'success' && steps.should-deploy.outputs.release-notes || '' }}

0 commit comments

Comments
 (0)