Weeknotes: GitHub Actions, switching gears on my fanfiction tracker
Week ending 11-4-22
New TILs:
I'm trying to work in public more, and break up the things I learn into smaller chunks, and practice more writing, so this week I distilled wha I learned from GH Actions into some TILs.
- Running an action conditionally
- Setting output for a step in a job, so a different job can use it
- Making one job in a workflow depend on another job
- Parsing JSON output from a GitHub Issue template in a GitHub Action
- Creating a new file and committing it using a GitHub Action
ao3-tracker
I'm going in a different direction with this. I honestly don't want to build a UI. I like using GH on my phone, but you can't directly edit files on mobile.
Current plan is this workflow to manage TBRs:
- Submit a new issue with a template
- GH action will auto-tag the issue with
tbr
- GH action will look at issues tagged
tbr
and find the link - Link gets passed to Python script that:
- Goes to AO3 to get data
- Parses data into JSON
- Uses JSON to generate YAML
- Writes the YAML to a new file
- GH action that commits the resulting new file to
main
- GH action that re-writes a TBR table in the style of my TIL readmes
- Will prove the concept in a public repo, then fork it to a private one to keep my TBRs private
Since I was doing a lot of testing of GH actions, my commits and PRs are all over the place. But here is what I worked on, broadly speaking. (Though almost every PR had a follow-up series of commits directly to main
as I debugged what was wrong in the action.)
I really need a CI step that validates my YAML. So many syntax errors.
- #49 Add conditional logic to an action to only run on certain labels
- #60 Action to close an issue after it's been commented on
- #64 Add action to parse the JSON of an issue
- #66 Hide Django since I'm not planning to use it and it distracts me.
media
- 📺 Severance season 1: Too dark for me. Didn't make it past the pilot.
- 📺 Jane the Virgin season 1: Rewatch and loving it.