SEC-090: Automated trusted workflow pinning (2024-12-01) (#5293)
* Result of tsccr-helper -log-level=info gha update -latest .github/ * chore: Fix usage of slack-github-action --------- Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com> Co-authored-by: Michael Li <michael.li@hashicorp.com>
This commit is contained in:
3 files changed
+17
-22
No files matched your search
@@ -327,27 +327,24 @@ jobs:
|
||||
env
|
||||
find ./enos -name "scenario.tf" -exec cat {} \;
|
||||
- name: Send Slack message if Run and Retry fails (or if something else went wrong)
|
||||
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
|
||||
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
|
||||
# steps.run.outcome reports as failure when there is an error in `Run Enos scenario`
|
||||
# failure() captures errors before `Run Enos scenario`
|
||||
# failure() does not capture errors in `Run Enos scenario` due to continue-on-error
|
||||
if: ${{ failure() || (steps.run.outcome == 'failure' && steps.run_retry.outcome == 'failure') }}
|
||||
with:
|
||||
channel-id: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_CHANNEL_ID }}
|
||||
method: chat.postMessage
|
||||
token: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_TOKEN }}
|
||||
payload: |
|
||||
{
|
||||
"text": ":x: e2e tests failed (${{ matrix.filter }}): ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Branch:* ${{ github.event.ref }}\n*SHA:* <${{ github.event.head_commit.url }}|${{ github.event.after }}>"
|
||||
}
|
||||
env:
|
||||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_TOKEN }}
|
||||
channel: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_CHANNEL_ID }}
|
||||
text: ":x: e2e tests failed (${{ matrix.filter }}): ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Branch:* ${{ github.event.ref }}\n*SHA:* <${{ github.event.head_commit.url }}|${{ github.event.after }}>"
|
||||
- name: Send Slack message if Run but Retry passes
|
||||
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
|
||||
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
|
||||
if: ${{ steps.run.outcome == 'failure' && steps.run_retry.outcome != 'failure' }}
|
||||
with:
|
||||
channel-id: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_CHANNEL_ID }}
|
||||
method: chat.postMessage
|
||||
token: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_TOKEN }}
|
||||
payload: |
|
||||
{
|
||||
"text": ":warning: e2e tests passed, but needed retry (${{ matrix.filter }}): ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Branch:* ${{ github.event.ref }}\n*SHA:* <${{ github.event.head_commit.url }}|${{ github.event.after }}>"
|
||||
}
|
||||
env:
|
||||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_TOKEN }}
|
||||
channel: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_CHANNEL_ID }}
|
||||
text: ":warning: e2e tests passed, but needed retry (${{ matrix.filter }}): ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Branch:* ${{ github.event.ref }}\n*SHA:* <${{ github.event.head_commit.url }}|${{ github.event.after }}>"
|
||||
|
||||
Reference in new issue
Block a user