Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💬 Fix Slack notification workflow #6560

Merged
merged 4 commits into from
Jan 15, 2025
Merged

💬 Fix Slack notification workflow #6560

merged 4 commits into from
Jan 15, 2025

Conversation

Gary-H9
Copy link
Contributor

@Gary-H9 Gary-H9 commented Jan 15, 2025

This relates to this Issue.

I've altered this per my reading of the release notes which include breaking changes for release 2.0.0 of the Slack Workflow which we consume.

I'm unsure if the following code should be the latter:

      - name: Notify Slack on Failure
        if: failure() && steps.terraform_apply.outcome == 'failure'
        id: slack_notification
        uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
        with:
          webhook-type: incoming-webhook
          payload: |
            {
              "run_id": "${{ github.run_id }}",
              "pr_number": "${{ steps.extract_pr.outputs.pr_number }}"
            }
        env:
          SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }}
      - name: Notify Slack on Failure
        if: failure() && steps.terraform_apply.outcome == 'failure'
        id: slack_notification
        uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
        with:
          webhook:  ${{ env.SLACK_WEBHOOK_URL }}
          webhook-type: incoming-webhook
          payload: |
            {
              "run_id": "${{ github.run_id }}",
              "pr_number": "${{ steps.extract_pr.outputs.pr_number }}"
            }

@github-actions github-actions bot added the github-workflow Pull requests that update workflows label Jan 15, 2025
@Gary-H9 Gary-H9 changed the title Fix/slack notification 💬 Fix Slack notification workflow Jan 15, 2025
@Gary-H9 Gary-H9 changed the title 💬 Fix Slack notification workflow 💬 Fix Slack notification workflow - test Jan 15, 2025
@Gary-H9 Gary-H9 changed the title 💬 Fix Slack notification workflow - test 💬 Fix Slack notification workflow Jan 15, 2025
@Gary-H9 Gary-H9 marked this pull request as ready for review January 15, 2025 10:36
@Gary-H9 Gary-H9 requested a review from a team as a code owner January 15, 2025 10:36
julialawrence
julialawrence previously approved these changes Jan 15, 2025
Copy link
Contributor

@julialawrence julialawrence left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@julialawrence julialawrence left a comment

Choose a reason for hiding this comment

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

LGTM

@Gary-H9 Gary-H9 merged commit d63ddbd into main Jan 15, 2025
9 checks passed
@Gary-H9 Gary-H9 deleted the fix/slack-notification branch January 15, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-workflow Pull requests that update workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants