Skip to content

oursky/github-actions-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Actions Manager

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.

Prerequisite

  • Go 1.18 (via asdf)

Running local development server

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

Receive Webhook on local development server

  1. Setup Reverse Proxy by following the Notion Guide.

  2. Go to Webhook tab of Settings page of a Repository with Action Runner Setup (e.g. https://github.com/oursky/github-actions-manager/settings). Press Add webhook.

  3. Fill in Payload URL with the reverse proxy URL according to the Notion Guide.

  4. Fill in Secret with the same value of webhookSecret in config.toml.

  5. Select Send me everything. in Which events would you like to trigger this webhook?.

  6. Save Webhook

Connect Slack App to local development server

  1. On Slack Portal https://api.slack.com/apps, press Create New App and select From scratch

  2. Under Basic Information -> App-Level Tokens, add an access token with scope [connections:write]. Copy the generated Token to appToken in config.toml.

  3. Under Socket Mode, enable Socket Mode.

  4. 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.) In config.toml, change commandName to your chosen prefix.

  5. Under OAuth & Permissions -> Scopes, select commands and chat:write.public (which will autoselect chat:write).

  6. Under OAuth & Permissions -> OAuth Tokens, install the app to the workspace. Copy the generated Bot User OAuth Token to botToken in config.toml.

  7. 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 generated token to token in config.toml.

FSPath

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".

  1. 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages