DEV Community

dmrp
dmrp

Posted on

Generate a unique game of life badge for a workflow run

My Workflow

The action takes a commit hash of the commit that triggered the workflow run and seeds with it the game of life. The game run is saved as gif the the location of your choosing and can be used in, e.g., Readme file as a unique badge for the build.

An example of the output:
Game of Life build badge

Submission Category:

Wacky Wildcards

Yaml File or Link to Code

Game of Life Action

Uses commit hash to seed a game of life and generates a unique gif stamp for your workflow run.

Parameters

All parameters are optional.

  • gol-path - output path for the generated game of life gif
  • rows - number of rows in the world
  • columns - number of columns in the world
  • generations - how many generations will be played

Example result from the last action workflow run:

Game of Life starts with commit hash




Additional Resources / Info

Many thanks to
https://github.com/monarchwadia/conways-game-engine
https://github.com/joshmarinacci/node-pureimage
https://github.com/eugeneware/png-file-stream
https://github.com/eugeneware/gifencoder

For making this rather straightforward :)

by Team Ananas:
Kristoffer Karlsson
Tobias Larsson
Damir Petrac
Per Sundqvist

Top comments (1)

Collapse
 
shadowtime2000 profile image
shadowtime2000

Cool!