diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 612c05f0..0aefde70 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -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 }}"