Skip to content

Commit

Permalink
chore: update slack action v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Jarczewski committed Oct 22, 2024
1 parent b174907 commit 623dc82
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,31 @@ jobs:
with:
args: "Error running `deploy` job in OpenAPI CI"

- name: Send Slack using Slack GHA notification
uses: slackapi/[email protected]
with:
payload: |
{
"text": "**new gha**\nPushed latest OpenAPI changes to `en` branch :rocket:",
"icon_url": "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4",
"username": "GitHub Actions"
}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

- name: Send Slack using Slack GHA notification
uses: slackapi/[email protected]
if: ${{ failure() }}
with:
payload: |
{
"text": "**new gha**\nError running `deploy` job in OpenAPI CI",
"icon_url": "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4",
"username": "GitHub Actions"
}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

# The deploy task actually deploys any changes to the en-staging branch
push-to-en-staging:
# We run this on the latest ubuntu
Expand Down Expand Up @@ -190,7 +215,7 @@ jobs:
with:
args: "Error running `deploy-staging` job in OpenAPI CI"

- name: Send Slack notification
- name: Send Slack using Slack GHA notification
uses: slackapi/[email protected]
with:
payload: |
Expand All @@ -202,6 +227,19 @@ jobs:
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

- name: Send Slack using Slack GHA notification
uses: slackapi/[email protected]
if: ${{ failure() }}
with:
payload: |
{
"text": "**new gha**\nError running `deploy-staging` job in OpenAPI CI",
"icon_url": "https://avatars3.githubusercontent.com/u/8659759?s=200&v=4",
"username": "GitHub Actions"
}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

# Build the OpenAPI spec and validate using Codegen
validate-spec:
name: Validate OpenAPI spec using Codegen
Expand Down

0 comments on commit 623dc82

Please sign in to comment.