diff --git a/.github/workflows/notify-slack-end.yml b/.github/workflows/notify-slack-end.yml index f472cfa..8b4fe51 100644 --- a/.github/workflows/notify-slack-end.yml +++ b/.github/workflows/notify-slack-end.yml @@ -50,7 +50,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "*${{ inputs.message && inputs.message || github.event.repository.name }} - ${{ github.workflow }}* \n <${{ github.event.repository.url }}/commit/${{ github.sha }} | ${{ env.cut_sha }}> (<${{ github.event.repository.url }}/actions/runs/${{ github.run_id }} | open>)" + "text": "*${{ inputs.message && inputs.message || github.event.repository.name }} - ${{ github.workflow }}* \n <${{ github.event.repository.html_url }}/commit/${{ github.sha }} | ${{ env.cut_sha }}> (<${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} | open>)" } }, { @@ -58,7 +58,7 @@ jobs: "elements": [ { "type": "plain_text", - "text": "${{ inputs.result == 'success' && 'Success' || 'Failure' }} after ${{ env.parsed_time }}", + "text": "${{ inputs.result == 'success' && 'Success' || inputs.result == 'cancelled' && 'Cancelled' || 'Failure' }} after ${{ env.parsed_time }}", "emoji": true } ] diff --git a/.github/workflows/notify-slack-start.yml b/.github/workflows/notify-slack-start.yml index 6bf4aae..ce667e9 100644 --- a/.github/workflows/notify-slack-start.yml +++ b/.github/workflows/notify-slack-start.yml @@ -48,7 +48,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "*${{ inputs.message && inputs.message || github.event.repository.name }} - ${{ github.workflow }}* 🚀 \n <${{ github.event.repository.url }}/commit/${{ github.sha }} | ${{ env.cut_sha }}> (<${{ github.event.repository.url }}/actions/runs/${{ github.run_id }} | open>)" + "text": "*${{ inputs.message && inputs.message || github.event.repository.name }} - ${{ github.workflow }}* 🚀 \n <${{ github.event.repository.html_url }}/commit/${{ github.sha }} | ${{ env.cut_sha }}> (<${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} | open>)" } }, { diff --git a/.github/workflows/test-slack.yml b/.github/workflows/test-slack.yml index 97d1f47..034aadc 100644 --- a/.github/workflows/test-slack.yml +++ b/.github/workflows/test-slack.yml @@ -10,7 +10,7 @@ concurrency: jobs: notify-start: name: Notify release start - uses: ho-nl/release-slack-action/.github/workflows/notify-slack-start.yml@main + uses: ./.github/workflows/notify-slack-start.yml secrets: slackToken: ${{ secrets.SLACK_BOT_RELEASE_TOKEN}} with: @@ -29,13 +29,13 @@ jobs: notify-end: if: always() name: Notify release end - needs: [ notify-start, activate-pm2 ] - uses: ho-nl/release-slack-action/.github/workflows/notify-slack-end.yml@main + needs: [ notify-start, release ] + uses: ./.github/workflows/notify-slack-end.yml secrets: slackToken: ${{ secrets.SLACK_BOT_RELEASE_TOKEN}} with: time: ${{ needs.notify-start.outputs.time }} - result: ${{ needs.activate-pm2.result }} + result: ${{ needs.release.result }} channel: 12gobiking-test message: Test notifyOnlyOnFailure: false