Skip to content

Commit

Permalink
added integration test for incoming webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengill committed Nov 25, 2021
1 parent fce05eb commit 67420c8
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
id: slack
uses: ./
with:
channel-id: 'CTAAHRA79'
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: 'CI Post from slack-send GitHub Action! Succeeded!!'
# payload: "{\"key\":\"value\",\"foo\":\"bar\"}"
env:
Expand Down Expand Up @@ -60,6 +60,27 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}


# Use the output from the `hello` step
- name: Get the output time
run: echo "The time was ${{ steps.slack.outputs.time }}"

integration_test_incoming_webhook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci && npm run build
- run: echo "${{ github.event_name }}"
- name: Post message to Slack via incoming webhook
id: slackIncoming
uses: ./
with:
# block kit payload
payload: "{\"text\":\"Incoming Webhook test for slack send\", \"blocks\":[{\"type\":\"section\",\"text\":{\"type\":\"plain_text\",\"text\":\"A post by Slack Send GitHub Action. Testing Incoming webhooks\",\"emoji\":true}}]}"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK


# Use the output from the `hello` step
- name: Get the output time
run: echo "The time was ${{ steps.slack.outputs.time }}"

0 comments on commit 67420c8

Please sign in to comment.