diff --git a/.github/actions/slack/action.yml b/.github/actions/slack/action.yml index 07a445e..f4acaba 100644 --- a/.github/actions/slack/action.yml +++ b/.github/actions/slack/action.yml @@ -7,7 +7,10 @@ inputs: channel: description: "The channel to send the message to" required: false - default: "slackapi/slack-github-action@v1" + default: "test-github-features" + webhook_url: + description: "The webhook url to use" + required: true runs: using: 'composite' steps: @@ -16,3 +19,5 @@ runs: with: channel-id: ${{ inputs.channel }} slack-message: ${{ inputs.message }} + env: + SLACK_WEBHOOK_URL: ${{ inputs.webhook_url }} diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 7115dbb..e54d556 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -30,8 +30,10 @@ jobs: uses: ./.github/actions/slack with: message: ":tada: Deployed to staging :white_check_mark: successfully!" + webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} - name: Notify (failed deployment) if: failure() uses: ./.github/actions/slack with: message: ":fail: Failed to deploy to staging :red_flag: successfully!" + webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/ping.yml b/.github/workflows/ping.yml index cce2ffb..5f126da 100644 --- a/.github/workflows/ping.yml +++ b/.github/workflows/ping.yml @@ -10,3 +10,4 @@ jobs: - uses: ./.github/actions/slack with: message: 'Hello from GitHub Actions! :tada:' + webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7ef3e7f..1dd484e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -27,9 +27,11 @@ jobs: uses: ./.github/actions/slack with: message: ":tada: Deployed to production :white_check_mark: successfully!" + webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} - name: Notify (failed deployment) if: failure() uses: ./.github/actions/slack with: message: ":fail: Failed to deploy to production :red_flag: successfully!" + webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}