[#171] Update Technique 2 to use GitHub Action Contexts instead of values property (#172)

This commit is contained in:
Michael Brooks
2023-01-25 14:37:26 +09:00
committed by GitHub
parent 82b575cf5a
commit e4e5777f27
2 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ By creating a new Slack app or using an existing one, this approach allows your
## Setup
* [Create a Slack App][apps] for your workspace (alternatively use an existing app you have already created and installed).
* Add the [`chat.write`](https://api.slack.com/scopes/chat:write) bot scope under **OAuth & Permissions**.
* Add the [`chat:write`](https://api.slack.com/scopes/chat:write) bot scope under **OAuth & Permissions**.
* Install the app to your workspace.
* Copy the app's Bot Token from the **OAuth & Permissions** page and [add it as a secret in your repo settings][repo-secret] named `SLACK_BOT_TOKEN`.
* Invite the bot user into the channel you wish to post messages to (`/invite @bot_user_name`).
@@ -31,9 +31,9 @@ jobs:
"type": "button",
"text": {
"type": "plain_text",
"text": $values.button_text
"text": "${{ github.sha }}"
},
"url": $values.button_url
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
@@ -42,6 +42,3 @@ jobs:
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
values: |
button_text: ${{ github.sha }}
button_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}