Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions .github/workflows/create-tag-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,13 @@ jobs:
git commit -m "Update v2-lite to $NEW_TAG"
git push origin v2-lite

- name: Success Slack Notification
if: steps.should-deploy.outputs.result == 'true' && success()
uses: rtCamp/action-slack-notify@v2
env:
MSG_MINIMAL: true
SLACK_WEBHOOK: ${{ env.SLACK_WEBHOOK }}
SLACK_TITLE: ${{ github.repository }}
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 }}>
SLACK_MESSAGE: |
Released `${{ env.NEW_TAG }}` to `gitstream-github-action`
${{ steps.should-deploy.outputs.release-notes }}

- name: Failure Slack Notification
if: steps.should-deploy.outputs.result == 'true' && failure()
uses: rtCamp/action-slack-notify@v2
env:
MSG_MINIMAL: true
SLACK_WEBHOOK: ${{ env.SLACK_WEBHOOK }}
SLACK_TITLE: ${{ github.repository }}
SLACK_COLOR: ${{ job.status }}
SLACK_FOOTER: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow run>
SLACK_MESSAGE: Failed to release `${{ env.NEW_TAG }}` to `gitstream-github-action`
- name: Slack Notification
if: steps.should-deploy.outputs.result == 'true' && always()
uses: linear-b/shared-workflows/.github/actions/slack-notification@develop
with:
status: ${{ job.status }}
webhook_url: ${{ env.SLACK_WEBHOOK }}
footer_links: <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ env.NEW_TAG }}|${{ env.NEW_TAG }}>
message: |
${{ job.status == 'success' && 'Released' || 'Failed to release' }} `${{ env.NEW_TAG }}` to `gitstream-github-action`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐞 Bug - Inaccurate Message: Add explicit handling for the 'cancelled' status in the message, or change the condition from 'always()' to '(success() || failure())' to match the previous behavior.

Suggested change
${{ job.status == 'success' && 'Released' || 'Failed to release' }} `${{ env.NEW_TAG }}` to `gitstream-github-action`
${{ job.status == 'success' && 'Released' || (job.status == 'cancelled' && 'Cancelled release of' || 'Failed to release') }} `${{ env.NEW_TAG }}` to `gitstream-github-action`
Is this review accurate? Use πŸ‘ or πŸ‘Ž to rate it

If you want to tell us more, use /gs feedback e.g. /gs feedback this review doesn't make sense, I disagree, and it keeps repeating over and over

${{ job.status == 'success' && steps.should-deploy.outputs.release-notes || '' }}