<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: dmrp</title>
    <description>The latest articles on Forem by dmrp (@kukukuchu).</description>
    <link>https://forem.com/kukukuchu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F470958%2F71918808-2574-4d04-aed8-fc672a7873ae.png</url>
      <title>Forem: dmrp</title>
      <link>https://forem.com/kukukuchu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kukukuchu"/>
    <language>en</language>
    <item>
      <title>Team Ananas makes a github action</title>
      <dc:creator>dmrp</dc:creator>
      <pubDate>Fri, 18 Sep 2020 06:56:22 +0000</pubDate>
      <link>https://forem.com/kukukuchu/team-ananas-makes-a-github-action-4l27</link>
      <guid>https://forem.com/kukukuchu/team-ananas-makes-a-github-action-4l27</guid>
      <description>&lt;p&gt;So autumn Solidify kickoff came along, and we decided to do the Github actions challenge. Still under the influence of our vacations we decided we don't intend to be useful and came with the idea to simulate a game of life during your build.&lt;/p&gt;

&lt;p&gt;The original idea was to have a parallel job that would print the game of life in your workflow run console so you can watch it while your workflow is running.&lt;/p&gt;

&lt;p&gt;But it turned out that we cant render each generation in place of the old one, but only sequentially. Obvious in retrospective, you are not looking at a terminal, you are looking at the logs. &lt;/p&gt;

&lt;p&gt;So we had to settle to just generate an animation of game of life that you could put as badge in your readme, seeded with the triggering git commit hash.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges
&lt;/h3&gt;

&lt;p&gt;Rendering images and gifs was made easy with great open source contributions but there was a problem: most ways to do that include getting canvas in node, and most ways to do that include system dependent binaries.&lt;/p&gt;

&lt;p&gt;Actions are taken as is from your repository, so there is little opportunity to do platform specific packaging to get different binaries for possible runner hosts.&lt;/p&gt;

&lt;p&gt;So special shout-out to &lt;a href="https://github.com/joshmarinacci/node-pureimage"&gt;joshmarinacci/node-pureimage&lt;/a&gt; for platform independent node canvas API. Just enough for our needs :)&lt;/p&gt;

&lt;p&gt;Gif generation was effortless with:&lt;br&gt;
&lt;a href="https://github.com/eugeneware/png-file-stream"&gt;https://github.com/eugeneware/png-file-stream&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/eugeneware/gifencoder"&gt;https://github.com/eugeneware/gifencoder&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Many thanks &lt;a href="http://eugeneware.com/"&gt;Eugene&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;And the root of our action, the game of life, was, of course, already done. Quite well in fact. Thank you &lt;a href="https://github.com/monarchwadia/conways-game-engine"&gt;@monarchwadia&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Action is in the marketplace if you wish to decorate your repo with game of life badges:&lt;br&gt;
&lt;a href="https://github.com/marketplace/actions/game-of-life-build-badge"&gt;https://github.com/marketplace/actions/game-of-life-build-badge&lt;/a&gt;&lt;/p&gt;

</description>
      <category>actionshackathon</category>
      <category>teamananas</category>
    </item>
    <item>
      <title>Generate a unique game of life badge for a workflow run</title>
      <dc:creator>dmrp</dc:creator>
      <pubDate>Fri, 18 Sep 2020 06:22:14 +0000</pubDate>
      <link>https://forem.com/kukukuchu/generate-a-unique-game-of-life-badge-for-a-workflow-run-4nmh</link>
      <guid>https://forem.com/kukukuchu/generate-a-unique-game-of-life-badge-for-a-workflow-run-4nmh</guid>
      <description>&lt;h3&gt;
  
  
  My Workflow
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;An example of the output:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KtjoThc3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xno46c484r3adjnd75tn.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KtjoThc3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xno46c484r3adjnd75tn.gif" alt="Game of Life build badge"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Submission Category:
&lt;/h3&gt;

&lt;p&gt;Wacky Wildcards&lt;/p&gt;
&lt;h3&gt;
  
  
  Yaml File or Link to Code
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/solidify"&gt;
        solidify
      &lt;/a&gt; / &lt;a href="https://github.com/solidify/github-action-game-of-life"&gt;
        github-action-game-of-life
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Game of Life Action&lt;/h1&gt;
&lt;p&gt;Uses commit hash to seed a game of life and generates a unique gif stamp for your workflow run.&lt;/p&gt;
&lt;h2&gt;
Parameters&lt;/h2&gt;
&lt;p&gt;All parameters are optional.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;gol-path&lt;/code&gt; - output path for the generated game of life gif&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rows&lt;/code&gt; - number of rows in the world&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;columns&lt;/code&gt; - number of columns in the world&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;generations&lt;/code&gt; - how many generations will be played&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example result from the last action workflow run:&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://raw.githubusercontent.com/solidify/github-action-game-of-life/master/./gol.gif"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x476MsrI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/solidify/github-action-game-of-life/master/./gol.gif" alt="Game of Life starts with commit hash"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/solidify/github-action-game-of-life"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h3&gt;
  
  
  Additional Resources / Info
&lt;/h3&gt;

&lt;p&gt;Many thanks to&lt;br&gt;
&lt;a href="https://github.com/monarchwadia/conways-game-engine"&gt;https://github.com/monarchwadia/conways-game-engine&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/joshmarinacci/node-pureimage"&gt;https://github.com/joshmarinacci/node-pureimage&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/eugeneware/png-file-stream"&gt;https://github.com/eugeneware/png-file-stream&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/eugeneware/gifencoder"&gt;https://github.com/eugeneware/gifencoder&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For making this rather straightforward :)&lt;/p&gt;

&lt;p&gt;by Team Ananas:&lt;br&gt;
&lt;a href="https://github.com/kristofferkarlssonsolidify"&gt;Kristoffer Karlsson&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/mrweiland"&gt;Tobias Larsson&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Kukukuchu"&gt;Damir Petrac&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/PerSundqvist"&gt;Per Sundqvist&lt;/a&gt;&lt;/p&gt;

</description>
      <category>actionshackathon</category>
    </item>
  </channel>
</rss>
