<?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: Brian Hill</title>
    <description>The latest articles on Forem by Brian Hill (@cbhill127).</description>
    <link>https://forem.com/cbhill127</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%2F454057%2F34a78ccc-466d-46aa-ba4d-bc77e6583e28.jpg</url>
      <title>Forem: Brian Hill</title>
      <link>https://forem.com/cbhill127</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/cbhill127"/>
    <language>en</language>
    <item>
      <title>Automate repository tagging with GitHub Actions</title>
      <dc:creator>Brian Hill</dc:creator>
      <pubDate>Thu, 17 Sep 2020 17:02:52 +0000</pubDate>
      <link>https://forem.com/trydaily/automate-repository-tagging-with-github-actions-2nhc</link>
      <guid>https://forem.com/trydaily/automate-repository-tagging-with-github-actions-2nhc</guid>
      <description>&lt;p&gt;At &lt;a href="https://www.daily.co/"&gt;Daily&lt;/a&gt;, we build video chat APIs to streamline adding video chat to any app or website. Developers are building a lot more with video these days, so we've been adding new API features (and growing our team!) to meet the demand. That’s meant many more pull requests. &lt;/p&gt;

&lt;p&gt;We use a monorepo to manage source code for most of our applications. As we faced the challenge of maintaining our &lt;a href="https://docs.daily.co/changelog"&gt;changelog&lt;/a&gt;, we understood&lt;br&gt;
that knowing what's changed in production wouldn't be as simple as comparing two commits in our monorepo, because we don't deploy every application with every commit.&lt;/p&gt;

&lt;p&gt;To help us understand what's changed, and which changes have been deployed to an environment, we developed&lt;br&gt;
a convention for tags we apply in our GitHub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Convention: [app-name]-[YYYY-mm-dd]-[environment]
Example: web-server-2020-07-01-production
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;While we agreed on a tagging convention for our repositories, asking everyone to manually update those tags was unsustainable. &lt;/p&gt;

&lt;p&gt;Enter our hero, GitHub actions! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/mSK26uXsLMwwg/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/mSK26uXsLMwwg/giphy.gif" alt="Avengers in Captain America Marvel movie" width="500" height="216"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;Like any of your favorite action movie heroes, &lt;a href="https://docs.github.com/en/actions"&gt;GitHub actions&lt;/a&gt; respond to a triggering event and save the day, errr, the developer from having to do a bunch of manual work. We use GitHub actions to automatically update our repository tags.&lt;/p&gt;
&lt;h2&gt;
  
  
  Our workflow
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;create-tag-action&lt;/code&gt; creates GitHub tags after the deployment of an application according to our convention. If the desired tag already exists, the commit with which the tag is associated is changed to the current commit being used in the workflow. &lt;/p&gt;
&lt;h2&gt;
  
  
  Our yaml file
&lt;/h2&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;Have a look at &lt;a href="https://github.com/daily-co/create-tag-action"&gt;our repository&lt;/a&gt; to get the full picture of how this works.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Submission category
&lt;/h2&gt;

&lt;p&gt;DIY Deployments  &lt;/p&gt;

&lt;h2&gt;
  
  
  Additional resources
&lt;/h2&gt;

&lt;p&gt;Our &lt;a href="https://github.com/daily-co/daily-demos"&gt;daily-demos open source repository&lt;/a&gt; makes use of this action. We hope that more projects try it out soon too, and that this overview was helpful. If you have any questions, please don’t hesitate to &lt;a href="https://www.daily.co/contact-us"&gt;reach out&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>actionshackathon</category>
      <category>github</category>
      <category>daily</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
