-
-
Notifications
You must be signed in to change notification settings - Fork 11
Description
ππ» 30 Minutes to Merge: Automating nose booping using Actions
π
Tuesday, May 25, 2021
π 11:00am Pacific Time (in your timezone)
ποΈ hosted by @github (github.community event)
π·οΈ Automation, Actions
Subscribe to this issues to get a notification before the show begins and a summary after the show concludes.
This will be a a follow to the show on learnwithjason.dev: https://www.learnwithjason.dev/github-automation-with-octokit (video, see also #11)
Together with @jlengstorf, we created a CLI to bump a nose-boop counter on Jason's GitHub profile page at https://github.com/jlengstorf/. We created a CLI and published it to npm. You can run it with npx boop-jasons-nose. It will create an issue in https://github.com/jlengstorf/jlengstorf.
We then created a GitHub App and deployed it to Netlify functions. The app receives webhook requests for new issues, and then is using its own credentials to bump the nose-boop counter (function source code).
We planned to use GitHub Actions, but Actions experienced problems at the time of the show, so we skipped that part and used a GitHub App instead.
Outline
- Quick recap of what we did during the Learn With Jason show. See gr2m/boop-gregors-nose. The relevant bit we want to automate with GitHub Actions is: for each newly created issue, bump the nose-boop counter by one.
- Create a GitHub Action with Node.js + Octokit
- pull request: feat: GitHub ActionΒ boop-gregors-nose#7
- create
.github/workflows/boop.ymland runcli.js - replace
cli.jswithaction.jsand authenticate usingGITHUB_TOKEN
- Make the action available to others
- Create
action.yml- usepersonal-access-tokeninput - Bundle code and all dependencies using https://github.com/vercel/ncc
- Setup continuous deployments using @semantic-release
- Create
- Publish the action to the Marketplace
Recording
Shownotes
- Find the action we created and published during the show at https://github.com/marketplace/actions/boop-gregor-s-nose
- Source code: https://github.com/gr2m/boop-gregors-nose
- Test repository: https://github.com/gr2m/boop-gregors-nose-test
- GitHub Documentation:
- We used
octokitfor sending requests to update the README and to create issues. - We used
@octokit/auth-oauth-deviceas the authentication strategy in the CLI - We used
@actions/coreto read thepersonal-access-tokeninput from GitHub Actions Workflows - We used @semantic-release for release automation (see workflow)
Todos
- Prepare a repository with a nose boop counter
- re-create the CLI to bump the counter as we did with Jason in https://www.learnwithjason.dev/github-automation-with-octokit
- schedule a start of show tweet
- tweet when recording is available
