Skip to content

Commit

Permalink
set token and method
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerJang27 committed Nov 20, 2024
1 parent 24c0a73 commit f5ed0eb
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/upload_results.reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@ jobs:
steps.download-ubuntu.outcome == 'failure' || steps.download-macos.outcome == 'failure' ||
steps.download-windows.outcome == 'failure'
with:
method: chat.postMessage
token: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }}
payload: |
channel: ${{ env.SLACK_CHANNEL_ID }}
text: "Artifact Download Failure"
# blocks:
# - type: section
# text:
# type: mrkdwn
# text: "Failure: <https://github.com/trunk-io/plugins/actions/runs/${{ github.run_id }}| Unable to download some ${{ inputs.results-prefix }}test result artifacts (ubuntu: ${{ steps.download-ubuntu.outcome }}, macos: ${{ steps.download-macos.outcome }}, windows: ${{ steps.download-windows.outcome }}) >"
env:
SLACK_BOT_TOKEN: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }}
blocks:
- type: section
text:
type: mrkdwn
text: "Failure: <https://github.com/trunk-io/plugins/actions/runs/${{ github.run_id }}| Unable to download some ${{ inputs.results-prefix }}test result artifacts (ubuntu: ${{ steps.download-ubuntu.outcome }}, macos: ${{ steps.download-macos.outcome }}, windows: ${{ steps.download-windows.outcome }}) >"
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
Expand Down Expand Up @@ -179,6 +179,8 @@ jobs:
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
if: always() && steps.parse.outputs.failures == 'true'
with:
method: chat.postMessage
token: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }}
payload: |
channel: plugins-notifications
text: "Artifact Download Failure"
Expand All @@ -187,13 +189,13 @@ jobs:
text:
type: mrkdwn
text: "Failure: <https://github.com/trunk-io/plugins/actions/runs/11923355842| Unable to download some test result artifacts (ubuntu: success, macos: success, windows: failure) >"
env:
SLACK_BOT_TOKEN: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }}
- name: Slack Notification For Staging Upload Failure
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
if: inputs.upload-validated-versions == true && steps.upload-staging.outcome == 'failure'
with:
method: chat.postMessage
token: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }}
payload: |
channel: ${{ env.SLACK_CHANNEL_ID }}
text: "Upload Failure"
Expand All @@ -202,13 +204,13 @@ jobs:
text:
type: mrkdwn
text: "Failure: <https://github.com/trunk-io/plugins/actions/runs/${{ github.run_id }}| Upload Test Results to Staging >"
env:
SLACK_BOT_TOKEN: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }}
- name: Slack Notification For Prod Upload Failure
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
if: inputs.upload-validated-versions == true && steps.upload-prod.outcome == 'failure'
with:
method: chat.postMessage
token: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }}
payload: |
channel: ${{ env.SLACK_CHANNEL_ID }}
text: "Upload Failure"
Expand All @@ -217,8 +219,6 @@ jobs:
text:
type: mrkdwn
text: "Failure: <https://github.com/trunk-io/plugins/actions/runs/${{ github.run_id }}| Upload Test Results to Prod >"
env:
SLACK_BOT_TOKEN: ${{ secrets.TRUNKBOT_SLACK_BOT_TOKEN }}
generate_snapshots_pr:
name: Generate Snapshots PR
runs-on: ubuntu-latest
Expand Down

0 comments on commit f5ed0eb

Please sign in to comment.