Default (completed) #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Default (completed) | |
| on: | |
| workflow_run: | |
| workflows: 'Default' | |
| types: | |
| - completed | |
| jobs: | |
| context: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| is_release_master: true | |
| is_release_tag: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| notify_slack: | |
| runs-on: ubuntu-latest | |
| needs: [context] | |
| # Only notify slack on release events | |
| if: ${{ needs.context.outputs.is_release_master || needs.context.outputs.is_release_tag }} | |
| steps: | |
| - name: Notify Slack | |
| uses: mozilla/addons/.github/actions/slack@main | |
| env: | |
| is_release_master: ${{ needs.context.outputs.is_release_master }} | |
| retry: '[Rerun Workflow](${{ github.event.workflow_run.rerun_url }})' | |
| event: ${{ env.is_release_master && 'Release Master' || 'Release Tag' }} | |
| conclusion: ${{ github.event.workflow_run.conclusion }} | |
| conclusion_emoji: ${{ env.conclusion == 'success' && ':white_check_mark:' || ':x:' }} | |
| text: ${{ env.conclusion_emoji }} ${{ env.event }} completed with ${{env.conclusion }} | |
| with: | |
| slack_token: ${{ secrets.SLACK_TOKEN }} | |
| method: chat.postMessage | |
| payload: | | |
| channel: ${{ secrets.SLACK_ADDONS_PRODUCTION_CHANNEL }} | |
| text: ${{ env.text }} | |
| blocks: | | |
| - type: context | |
| elements: | |
| - type: mrkdwn | |
| text: ${{ env.text }} | |
| - type: mrkdwn | |
| text: ":github: *Workflow Run:* ${{ github.event.workflow_run.url }}" | |
| - type: mrkdwn | |
| text: ":bust_in_silhouette: *Triggered by:* @${{ github.actor }}" | |
| - type: section | |
| text: | |
| type: mrkdwn | |
| text: ${{ github.event.workflow_run.conclusion == 'failure' && env.retry || '' }} | |