Skip to content

Commit

Permalink
fix(github-actions): move slack webhook url to under slack action (#8060
Browse files Browse the repository at this point in the history
)

### Related Ticket(s)

No related issue

### Description

The slack webhook as a global environment variable was getting burned into the React artifacts when building to Github Pages. This exposes the secret which isn't desired.

This PR moves the environment variable specifically under the Slack action in the workflow to avoid this.

### Changelog

**Changed**

- `deploy-canary.yml`
- `deploy-next.yml`
  • Loading branch information
jeffchew authored Jan 18, 2022
1 parent 630172b commit 2bf3bcd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/deploy-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
react:
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom'
runs-on: ubuntu-20.04
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -101,12 +99,12 @@ jobs:
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
web-components:
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom'
runs-on: ubuntu-20.04
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -211,12 +209,12 @@ jobs:
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
services:
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom'
runs-on: ubuntu-20.04
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -263,12 +261,12 @@ jobs:
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
utilities:
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom'
runs-on: ubuntu-20.04
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -314,4 +312,6 @@ jobs:
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
8 changes: 4 additions & 4 deletions .github/workflows/deploy-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
react:
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom'
runs-on: ubuntu-20.04
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -82,12 +80,12 @@ jobs:
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
web-components:
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom'
runs-on: ubuntu-20.04
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -155,4 +153,6 @@ jobs:
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

0 comments on commit 2bf3bcd

Please sign in to comment.