diff --git a/.github/workflows/botPostMessage.yml b/.github/workflows/main.yml similarity index 73% rename from .github/workflows/botPostMessage.yml rename to .github/workflows/main.yml index 61eace7..35c2d72 100644 --- a/.github/workflows/botPostMessage.yml +++ b/.github/workflows/main.yml @@ -7,13 +7,14 @@ jobs: steps: - name: Publish to slack id: slack - uses: slackapi/slack-github-action@v1.14.0 + uses: slackapi/slack-github-action@v1.15.0 with: channel-id: 'CTAAHRA79' slack-message: 'posting from a github action!' + payload: "{\"key\":\"value\",\"foo\":\"bar\"}" env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} - # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # Use the output from the `hello` step - name: Get the output time diff --git a/.github/workflows/webhookCustomJSON.yml b/.github/workflows/webhookCustomJSON.yml deleted file mode 100644 index 8ec57a7..0000000 --- a/.github/workflows/webhookCustomJSON.yml +++ /dev/null @@ -1,18 +0,0 @@ -on: [push] - -jobs: - new_push_job: - runs-on: ubuntu-latest - name: New push to repo - steps: - - name: Publish to slack - id: slack - uses: slackapi/slack-github-action@v1.14.0 - with: - payload: "{\"key\":\"value\",\"foo\":\"bar\"}" - env: - 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.hello.outputs.time }}" diff --git a/README.md b/README.md index fe8c2a8..53d7eea 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Slack GitHub Action +# Slack Send GitHub Action Send data into Slack using this GitHub Action! This package has two different techniques to send data to Slack: diff --git a/action.yml b/action.yml index d3ffbe7..db7bdd4 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ -name: 'Slack Push' -description: 'Publish a message in a channel or send the github payload to workflow builder' +name: 'slack-send' +description: 'Publish a message in a channel or send a JSON payload to the Slack Workflow Builder' inputs: channel-id: # channel id to post message when using bot token description: 'Slack channel ID where message will be posted. Needed if using bot token' diff --git a/example-workflows/Bot token post to channel/main.yml b/example-workflows/Bot token post to channel/main.yml index 4b1ec17..a97ec12 100644 --- a/example-workflows/Bot token post to channel/main.yml +++ b/example-workflows/Bot token post to channel/main.yml @@ -7,7 +7,7 @@ jobs: steps: - name: Publish to slack channel via bot token id: slack - uses: slackapi/slack-github-action@v1.14.0 + uses: slackapi/slack-github-action@v1.15.0 with: channel-id: 'SLACK_CHANNEL_ID' # ID of Slack Channel you want to post to slack-message: 'posting from a github action!' # The message you want to post diff --git a/example-workflows/Workflow builder/customJSONPayload.yml b/example-workflows/Workflow builder/customJSONPayload.yml index f116341..c13a76c 100644 --- a/example-workflows/Workflow builder/customJSONPayload.yml +++ b/example-workflows/Workflow builder/customJSONPayload.yml @@ -7,7 +7,7 @@ jobs: steps: - name: Send GitHub trigger payload to Slack Workflow Builder id: slack - uses: slackapi/slack-github-action@v1.14.0 + uses: slackapi/slack-github-action@v1.15.0 with: payload: "{\"key\":\"value\",\"foo\":\"bar\"}" env: diff --git a/example-workflows/Workflow builder/githubTriggerPayload.yml b/example-workflows/Workflow builder/githubTriggerPayload.yml index 69d4d43..17668f1 100644 --- a/example-workflows/Workflow builder/githubTriggerPayload.yml +++ b/example-workflows/Workflow builder/githubTriggerPayload.yml @@ -7,6 +7,6 @@ jobs: steps: - name: Send GitHub trigger payload to Slack Workflow Builder id: slack - uses: slackapi/slack-github-action@v1.14.0 + uses: slackapi/slack-github-action@v1.15.0 env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/package.json b/package.json index aa018f5..c1c4b3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "slack-github-action", - "version": "1.14.0", + "version": "1.15.0", "description": "The official slack github action. Use this to send data into your Slack workspace", "main": "dist/index.js", "scripts": {