This app has three components: the GitHub Action repo, the intermediate server, and the Slack interface. It is recommended to create your own repo to test the app, using the 2,000 free minutes they give you every month.
- Go 1.18 (via asdf)
On root directory:
cp examples/config.dev.toml config.toml
Follow the directons below to generate values of token
, botToken
and appToken
for config.toml
. Then:
go run ./cmd/github-actions-manager -config config.toml -loglevel DEBUG
-
Setup Reverse Proxy by following the Notion Guide.
-
Go to
Webhook
tab ofSettings
page of a Repository with Action Runner Setup (e.g. https://github.com/oursky/github-actions-manager/settings). PressAdd webhook
. -
Fill in
Payload URL
with the reverse proxy URL according to the Notion Guide. -
Fill in
Secret
with the same value ofwebhookSecret
inconfig.toml
. -
Select
Send me everything.
inWhich events would you like to trigger this webhook?
. -
Save Webhook
-
On Slack Portal https://api.slack.com/apps, press
Create New App
and selectFrom scratch
-
Under
Basic Information
->App-Level Tokens
, add an access token with scope[connections:write]
. Copy the generatedToken
toappToken
inconfig.toml
. -
Under
Socket Mode
, enable Socket Mode. -
Under
Add features and functionality
->Slash Commands
->Create New Command
, add a command. (It is advidable to pick a command prefix that does not overlap with existing bot commands.) Inconfig.toml
, changecommandName
to your chosen prefix. -
Under
OAuth & Permissions
->Scopes
, selectcommands
andchat:write.public
(which will autoselectchat:write
). -
Under
OAuth & Permissions
->OAuth Tokens
, install the app to the workspace. Copy the generatedBot User OAuth Token
tobotToken
inconfig.toml
. -
Under Github tokens page https://github.com/settings/tokens, generate a Github personal access token (classic) with scope
[workflow, notifications]
(this may be more than strictly necessary). Copy the generatedtoken
totoken
inconfig.toml
.
Currently, persistent configs are being stored in a low-density file storage system under fs
.
If you want to disable config persistence i.e. reconstruct the list of subscribed repos after every restart:
Under config.toml
-> [store]
, change type
to "InMemory"
.
- Test the app in a public channel (e.g. #team-bot-sandbox). The app was not designed with direct messages in mind and may not work there.