Skip to content

Commit

Permalink
fix(actions): Pass secret as an input
Browse files Browse the repository at this point in the history
  • Loading branch information
SokratisVidros committed May 9, 2024
1 parent d472fca commit 1699b45
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/actions/slack-notify-on-failure/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
name: 'Notify Slack on workflow failure'

inputs:
slackWebhookURL:
required: true
type: string

runs:
using: "composite"
steps:
Expand All @@ -12,4 +18,4 @@ runs:
notify_when: "failure"
status: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_ENG_FEED_GITHUB }}
SLACK_WEBHOOK_URL: ${{ input.slackWebhookURL }}
2 changes: 2 additions & 0 deletions .github/workflows/reusable-api-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,5 @@ jobs:
cd apps/api && pnpm test
- uses: ./.github/actions/slack-notify-on-failure
with:
slackWebhookURL: ${{ secrets.SLACK_WEBHOOK_URL_ENG_FEED_GITHUB }}
4 changes: 4 additions & 0 deletions .github/workflows/reusable-web-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ jobs:
retention-days: 14

- uses: ./.github/actions/slack-notify-on-failure
with:
slackWebhookURL: ${{ secrets.SLACK_WEBHOOK_URL_ENG_FEED_GITHUB }}

component_web:
if: "!contains(github.event.head_commit.message, 'ci skip')"
Expand Down Expand Up @@ -232,3 +234,5 @@ jobs:
path: apps/web/cypress/screenshots

- uses: ./.github/actions/slack-notify-on-failure
with:
slackWebhookURL: ${{ secrets.SLACK_WEBHOOK_URL_ENG_FEED_GITHUB }}
2 changes: 2 additions & 0 deletions .github/workflows/reusable-widget-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,5 @@ jobs:
path: apps/widget/cypress/videos

- uses: ./.github/actions/slack-notify-on-failure
with:
slackWebhookURL: ${{ secrets.SLACK_WEBHOOK_URL_ENG_FEED_GITHUB }}

0 comments on commit 1699b45

Please sign in to comment.