This repo contains stupid GitHub actions. They are:
- Holiday Reminder
- Recursive Action
- Exponential Action
- Turning on Smart Lights with Each Commit
- World's Worst Tic-Tac-Toe UX
- INSERT YOUR IDEA HERE
I created a video explanation of these actions here: https://www.youtube.com/watch?v=w7-ugGAYVCo
By using a cron schedule string and the fact that a failed job sends an email, we can make a holiday reminder email.
We can even make sure to include specific text by naming our workflow and jobs with the desired info!
By creating a commit and pushing it within an action triggered on push
this would be trivial, except that GitHub specifically prevents commits made by the default repo token from triggering new workflows.
To get around this, we use a Personal Access Token to perform the git commands and to prevent the chain from continuing forever we increment a counter file in the repo.
Creating infinite actions using the Recursive Action
above was fun... but how can we do it faster?!
This action triggers N new workflows with each run. We cant use the same file counter trick to contain the process because of issues with the workflows trying to make simultaneous commits, so we move the counters into tags!
With some smart plugs and a python API client we can configure an action to turn our lights on for some period of time.
This is the ultimate way to incentivize code velocity... we need to commit new code every N minutes to keep the lights on!
The game Tic-Tac-Toe where you play a turn, commit the resulting board, wait for the AI to play its turn (within a GitHub action), and then play your next turn...
To play run:
node ./tic-tac-toe/index.js
Add an issue with your idea for a stupid action (or even better make a pull request!)