<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pierre Nicolas Durette on Medium]]></title>
        <description><![CDATA[Stories by Pierre Nicolas Durette on Medium]]></description>
        <link>https://medium.com/@PierreNick?source=rss-9a71e5dd9225------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*DBqSL63gWQLo4g6x.jpeg</url>
            <title>Stories by Pierre Nicolas Durette on Medium</title>
            <link>https://medium.com/@PierreNick?source=rss-9a71e5dd9225------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 13:38:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@PierreNick/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GitHub Actions: Beyond CI/CD]]></title>
            <link>https://medium.com/slalom-build/github-actions-beyond-ci-cd-cb3ddc6abaa?source=rss-9a71e5dd9225------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb3ddc6abaa</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Pierre Nicolas Durette]]></dc:creator>
            <pubDate>Wed, 05 Feb 2020 21:16:14 GMT</pubDate>
            <atom:updated>2020-02-05T21:16:14.891Z</atom:updated>
            <content:encoded><![CDATA[<h4>Exploring the new GitHub Actions: don’t just automate code; automate your software development life cycle</h4><figure><img alt="Laptop screen showing the GitHub Actions homepage, next to a framed schnauzer picture." src="https://cdn-images-1.medium.com/max/1024/1*CW-pshnFfD5CzgW0V-U9Mg.jpeg" /></figure><p><em>Note: this post assumes the reader possesses a minimum understanding of continuous integration (CI) and using GitHub for version control.</em></p><p>After more than a year in beta, <a href="https://github.com/features/actions">GitHub Actions</a> has finally made it to general availability at <a href="https://github.blog/2019-11-13-universe-day-one/">GitHub Universe 2019</a>. What is GitHub Actions? Think of it as GitHub’s own integrated TravisCI or CircleCI, but it can do <em>so</em> much more than build, test, and deploy code.</p><h4>GitHub Actions vs. the World: Workflows</h4><p>In TravisCI, CircleCI, or even <a href="https://docs.gitlab.com/ee/ci/">GitLab CI/CD</a>¹, developers author one YAML file that describes the steps to run—typically to build/test/push/deploy software—in response to a small set of events such as pushes, pull requests, tags, API triggers or a cron schedule.</p><p>In GitHub Actions, this is called a <strong><em>workflow</em></strong>, and a repository can contain more than one, each in its own YAML file.</p><h4>Anatomy of a Workflow</h4><p>Workflows are made up of one or more <strong>jobs.</strong> Each job <a href="https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on">runs in its own environment</a> — Ubuntu, Windows, macOS or <a href="https://help.github.com/en/actions/automating-your-workflow-with-github-actions/hosting-your-own-runners">self-hosted</a> — and can be run in parallel or chained to other jobs.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/15e8fea1573de1e85bbfdd046c61f5de/href">https://medium.com/media/15e8fea1573de1e85bbfdd046c61f5de/href</a></iframe><p>In turn, jobs run a sequence of <strong>steps. </strong>Each step is either:</p><ul><li>a shell command: run: echo Hello, world!</li><li>an <em>action</em>:uses: actions/checkout@v1.</li></ul><p>More on actions later. Each step can also have an optional name for display during a run.</p><h4>Workflow expressions</h4><p>The <a href="https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions">expression syntax</a> is particularly concise and elegant: GitHub Actions exposes rich contextual information and functions that can be expanded or used to control flow with ‘if’ conditional statements:</p><pre>steps:<br>- run: echo Hi ${{ github.actor }}!<br>  if: runner.os == &#39;Linux&#39;</pre><p>In this example, the user login name is provided by the github.actor property, while the operating system name of the current runner is provided by the runner.os property.</p><p>GitHub Actions adopts useful features already popularized by similar tools such as <a href="https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#configuring-a-build-matrix">matrix builds</a>. These run the same job in parallel across each permutation of operating systems, platforms, and versions specified:</p><pre>runs-on: ${{ matrix.os }}<br>strategy:<br>  matrix:<br>    node: [6, 8, 10]<br>    os: [ubuntu-16.04, ubuntu-18.04]</pre><p>The job configuration above specifies two OS and three Node versions, which would produce a total of six concurrent runs. The matrix context exposes the value of the current configuration anywhere within the job, in this case matrix.os and matrix.node.</p><h3>Power of Events</h3><p>One element that puts GitHub Actions ahead of similar tools is the vast array of <strong><em>events</em></strong> available.<em> </em>A workflow can be triggered by<strong> </strong><a href="https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows"><strong>virtually anything</strong> that can happen inside GitHub</a>. For example:</p><pre>on: [create, delete]</pre><p>This would trigger on the creation or deletion of a branch or tag.</p><p>Other available events:</p><ul><li>push</li><li>pull_request</li><li>pull_request_review, pull_request_review_comment</li><li>Branch &amp; tag: create, delete</li><li>issues, issue_comment</li><li>Repository made public</li><li>Wiki page created/updated: gollum</li><li>label</li><li>… and much more.</li></ul><p>Even better, you can fine-grain which <em>activity type(s)</em> within an event to act on. For example the pull_request event includes these activities:</p><ul><li>assigned, unassigned</li><li>labeled, unlabeled</li><li>opened, closed, reopened, edited</li><li>ready_for_review, review_requested</li></ul><p>Which can be leveraged like so:</p><pre>on:<br>  pull_request:<br>    types: [opened, reopened]</pre><p>For the push and pull_request events, GitHub Actions adds extensive filtering options for <a href="https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestbranchestags">branches, tags</a>, and file <a href="https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths">paths</a> as well. The latter allowing the creation of unique workflows for distinct microservices in a <a href="https://en.wikipedia.org/wiki/Monorepo">monorepo</a>.</p><p>GitHub Actions workflows can be run on:</p><ul><li>schedule using cron syntax</li><li>External API trigger (repository_dispatch): specific workflows can be triggered by a simple call to the GitHub API.</li></ul><h3>Actions: Abstract, Reuse, Share</h3><p>Still, the biggest feature of GitHub Actions is undeniably the <strong><em>actions</em></strong> themselves:</p><blockquote>Actions are the smallest portable building block of a workflow. <strong>You can create your own actions, use actions shared from the GitHub community, and customize public actions</strong>. (<a href="https://help.github.com/en/actions/automating-your-workflow-with-github-actions/core-concepts-for-github-actions">Official Documentation</a>)</blockquote><p>Actions are comparable to “open source blackboxes”: they abstract complex tasks as one workflow step. Similar to functions they can have parameters and outputs. But most of all they’re designed to be open and made available to other repositories.</p><h4>Using Actions</h4><p>As seen earlier, a workflow job step uses an action. Workflows can use actions in many ways:</p><ul><li>From within the repository: uses: &lt;path&gt;</li><li>From a Docker image: uses: docker://&lt;repository&gt;:&lt;tag&gt;</li><li>From another GitHub repository: uses: &lt;user&gt;/&lt;repo&gt;@&lt;ref&gt;</li></ul><p>Consider an example of the GitHub repository action:</p><pre>- uses: actions/checkout@v1</pre><p>Here, action/checkout@v1 means “release v1 of action at <a href="https://github.com/actions/checkout">https://github.com/actions/checkout</a>”. Branches, tags and commits can be used instead of releases to pin actions to specific versions. For example:</p><pre>- uses: repo/action@a-branch  # a branch<br>- uses: repo/action@v1.0.4    # a tag<br>- uses: repo/action@6ab37fc   # a commit<br>- uses: repo/action           # the &#39;master&#39; branch</pre><h4>Inputs</h4><p>Often the first action used in a job, actions/checkout checks out the appropriate commit. Under the hood this action does way more than a simple git checkout, but that complexity is hidden. What if the checkout must be customized? Like many actions, actions/checkout accepts various <strong>input</strong> parameters:</p><pre>- uses: actions/checkout@v1<br>  with:<br>    submodules: true<br>    fetch-depth: 1</pre><p>Actions hosted on GitHub must define a metadata file called action.yml which will describe the available inputs, outputs, and more. For the example above see: <a href="https://github.com/actions/checkout/blob/v1.0.0/action.yml">https://github.com/actions/checkout/blob/v1.0.0/action.yml</a>.</p><h4>Official Actions</h4><p>GitHub provides a number of readily available actions under the actions <a href="https://github.com/actions">organization</a>:</p><ul><li>Basic actions: <a href="https://github.com/actions/checkout">checkout</a>, <a href="https://github.com/actions/upload-artifact">upload-artifact</a>, <a href="https://github.com/actions/create-release">create-release</a></li><li>The setup series, which provides ready-made configurable environments for working with specific programming languages: <a href="https://github.com/actions/setup-node">setup-node</a>, <a href="https://github.com/actions/setup-python">setup-python</a>, <a href="https://github.com/actions/setup-go">setup-go</a>, <a href="https://github.com/actions/setup-ruby">setup-ruby</a>, <a href="https://github.com/actions/setup-dotnet">setup-dotnet</a>, <a href="https://github.com/actions/setup-java">setup-java</a>, <a href="https://github.com/actions/setup-elixir">setup-elixir</a>, <a href="https://github.com/actions/setup-haskell">setup-haskell</a></li><li>Cloud platforms:<a href="https://github.com/actions/gcloud">gcloud</a>, <a href="https://github.com/actions/aws">aws</a>, <a href="https://github.com/Azure/actions">azure</a></li><li>Miscellaneous tasks, e.g. <a href="https://github.com/actions/stale">stale</a> (mark Issue and Pull Requests that did not have recent interactions), <a href="https://github.com/actions/labeler">labeler</a> (label/triage Pull Requests based on paths modified)</li><li>… and much more.</li></ul><h4>Third-Party Action Example: HashiCorp <a href="https://www.terraform.io/">Terraform</a></h4><p>GitHub Actions really shines when it comes to third-party actions. HashiCorp maintains the aptly-named <a href="https://github.com/hashicorp/terraform-github-actions">hashicorp/terraform-github-actions</a> (<a href="https://www.terraform.io/docs/github-actions/index.html">docs</a>) that can, amongst other things:</p><ul><li>Install a specific version of Terraform</li><li>Provide usable <em>action outputs</em> when relevant. For example a step running a terraform plan that has changed will output tf_actions_plan_has_changes true which can be used to control subsequent behaviour</li><li>Create Pull Request comments when relevant. For example a terraform plan, fmt, or validate ran on a Pull Request will show the diff of the plan right in that Pull Request!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wwLB18fv7ICcBBIhmcSlwQ.png" /><figcaption>Pull Request message following a failed ‘terraform fmt’ (format).</figcaption></figure><h4>Actions in the GitHub Marketplace</h4><p>GitHub Actions are being touted as being, “A community-led approach to software automation” which is in part driven by the <a href="https://github.com/marketplace?type=actions">GitHub Marketplace</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ml90Vvz0x66_wrPuKPdWug.png" /><figcaption>The GitHub Marketplace for Actions listing over 1500 Actions as of December 2019.</figcaption></figure><p>Small sample of community actions:</p><ul><li><a href="https://github.com/marketplace/actions/pr-merge-bot">PR Merge Bot</a>: merge Pull Requests automatically as soon as certain conditions are met</li><li><a href="https://github.com/marketplace?utf8=%E2%9C%93&amp;type=actions&amp;query=Jira">Atlassian Jira GitHub Actions</a>: create issues from //TODO: or #TODO: found in code</li><li><a href="https://github.com/WyriHaximus/github-action-next-semvers">Next SemVers</a>: takes a <a href="https://semver.org/">semantic version</a> (e.g. 1.2.3) and outputs the next <em>patch</em> (1.2.4), <em>minor</em> (1.3.0) and <em>major</em> (2.0.0) versions</li></ul><h4>More Ways to Find Actions</h4><ul><li>The awesome-actions repository has a great categorized list of links to community actions, documentation, tutorials, examples, and more:<br><a href="https://github.com/sdras/awesome-actions">https://github.com/sdras/awesome-actions</a></li><li>The github-actions topic on GitHub itself:<br><a href="https://github.com/topics/github-actions">https://github.com/topics/github-actions</a></li></ul><p><em>Important note: earlier during the beta period, GitHub Actions used HCL as opposed to YAML. Some actions (including first-party) might have not yet been converted to the new format.</em></p><h3>Ways to get started</h3><ul><li><a href="https://help.github.com/en/actions/automating-your-workflow-with-github-actions/getting-started-with-github-actions">The GitHub Actions documentation</a>;</li><li>From any repository, select the ‘<em>Actions</em>’ tab and pick from a list of workflow templates automatically detected based on your project type</li><li>Use the ‘<em>Actions’</em> tab <a href="https://github.blog/2019-10-01-new-workflow-editor-for-github-actions/">powerful workflow editor</a> to add Marketplace actions directly—featuring auto-complete, smart YAML indentation, error detection and more.</li></ul><p>[1] GitLab CI/CD does have an <a href="https://docs.gitlab.com/ee/ci/yaml/#include">include</a> feature that technically allows more than one YAML file.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb3ddc6abaa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/slalom-build/github-actions-beyond-ci-cd-cb3ddc6abaa">GitHub Actions: Beyond CI/CD</a> was originally published in <a href="https://medium.com/slalom-build">Slalom Build</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>