{"componentChunkName":"component---node-modules-nehalist-gatsby-theme-nehalem-src-templates-post-tsx","path":"/getting-started-with-github-actions","result":{"data":{"post":{"id":"c1a9e7cf-9fd6-5e1a-8571-f13c8e00bedc","headings":[{"depth":2},{"depth":2},{"depth":2},{"depth":3},{"depth":3},{"depth":3},{"depth":3},{"depth":3},{"depth":3},{"depth":2}],"frontmatter":{"title":"Github Actions: Getting Started Guide","path":"/getting-started-with-github-actions","tags":["DevOps"],"excerpt":"How to get up and running with Github Actions, in only a couple minutes.","created":"2020-11-23T00:00:00.000Z","createdPretty":"23 November, 2020","updated":"2020-11-24T00:00:00.000Z","updatedPretty":"24 November, 2020","featuredImage":{"childImageSharp":{"sizes":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAOABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAIFAQT/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAAB1u17JxTD/8QAGRABAQADAQAAAAAAAAAAAAAAAQACERIT/9oACAEBAAEFAuS8y4nAYxC1f//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABYQAAMAAAAAAAAAAAAAAAAAAAEQMf/aAAgBAQAGPwKhwP8A/8QAGxABAQEAAgMAAAAAAAAAAAAAAREAIVFxgaH/2gAIAQEAAT8h54h71CiM6wUsyl+OAgB40db/2gAMAwEAAgADAAAAEOAP/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPxA//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPxA//8QAGRABAQEBAQEAAAAAAAAAAAAAAREAITFh/9oACAEBAAE/EOxIPRF1kb6q4mVHpSOe9T6pV3ZGaxO74t//2Q==","aspectRatio":1.4285714285714286,"src":"/static/eb51d7ccf12dc52a402253785972df62/f2cbb/cover.jpg","srcSet":"/static/eb51d7ccf12dc52a402253785972df62/8850c/cover.jpg 200w,\n/static/eb51d7ccf12dc52a402253785972df62/da113/cover.jpg 400w,\n/static/eb51d7ccf12dc52a402253785972df62/f2cbb/cover.jpg 800w,\n/static/eb51d7ccf12dc52a402253785972df62/c26c2/cover.jpg 1200w,\n/static/eb51d7ccf12dc52a402253785972df62/9352a/cover.jpg 1600w,\n/static/eb51d7ccf12dc52a402253785972df62/4fb49/cover.jpg 1920w","sizes":"(max-width: 800px) 100vw, 800px"}}}},"html":"<h2 id=\"overview\" style=\"position:relative;\"><a href=\"#overview\" aria-label=\"overview permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Overview</h2>\n<p>Hello again! Today I'm going to get you started using Github Actions. Github Actions are an absolutely amazing resource for helping developers perform mundane tasks automatically. If you have never setup CI/CD systems before and want to get started, there is no better way than with Github Actions. So, let's get started!</p>\n<h2 id=\"github-actions-pricing\" style=\"position:relative;\"><a href=\"#github-actions-pricing\" aria-label=\"github actions pricing permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Github Actions Pricing</h2>\n<p><strong>TLDR; It's free for public repos and really reasonable for private repos with a very generous free tier! (2000 minutes free)</strong> </p>\n<p>So, let's talk pricing first since you don't want to read a tutorial about some great product that you can't afford. Luckily for you Github Actions Pricing is very affordable and by affordable I mean basically free for most users (I personally haven't payed a dime) and still pretty cost-effective for larger teams and organizations. But you don't have to take my word for it. Their <a href=\"https://github.com/pricing\">pricing page</a> is super straightforward and gives a really solid outline of how the tiered system works.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/c10409d55186f57a0d7d689007fb3107/a2b91/GithubPricing.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50.66666666666667%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAACQUlEQVQoz3VSO4sUQRBeMBN8BgYXiok/wEjBU1FPTRTkDAwEUU89DwM5QVA0EfG8wFMxMPHwXD1xzU48A0Ew8BEJGon32MfMzkz39EzP7M6rZ/ezenYXQbCg6P66qr/6uqtKIOt2u/jXVJaCMwfS9yFcF7ZtgXMGT7j4n6VpitKALM1yiCAG9yO4MoLFJVbqFmqmg3qTYbVhYalq0mrDky14HhUSHjw/gMo7BUee5ygp1QMPK1+xZvctbD/5GFtHH2DbiUcYOnofGw7exeZD97BxZAqbDk9j/YE7WDsygy2nFjB0+h3WHX+JxS+/e69SmrDP/urDT+w48wSjN17j2LV5HJksY9/lZ9gzMVv48KVZwnMYHn+KneNl7L3+EftvfsKuKwv4/KPWI9QKs0zRczPknQ70nnFBWCGjakHYgi9lkZhRjmGYBaZfh/RcGPUqkqhVKOvdUX3CNCtAnCTgrij+Qp8FQViQ6n0UxbAdDklnukCrHcNhLt1JMeDQwkqaSFcIojY1wcBq3YTwQzBfYrnaQKPpwA/bMBnHSs0oYrIdFXmGxSgWIekL0qSFQk2YUMst26bxsBHHMSkLCVvwaWz0OAhPwDRNhHQeJzF1WVBeRK9RfwkHCnPydqJQ4zGWmxIs7MCWGZZMiSprwwkoxiL8anhouAnFFAy/gxWeoy4UIrqrv6kYmyRVeoLwvRbjwguOi2UHV99wTL8XODfnkNu4/dbFZIVjjPBZ8qlFgYl5hrHnDOfLNPR+Cr+VovJN4A+qjMVb1aIzOgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Github Pricing Plan Page Screenshot\"\n        title=\"Github Pricing Plan Page Screenshot\"\n        src=\"/static/c10409d55186f57a0d7d689007fb3107/c1b63/GithubPricing.png\"\n        srcset=\"/static/c10409d55186f57a0d7d689007fb3107/5a46d/GithubPricing.png 300w,\n/static/c10409d55186f57a0d7d689007fb3107/0a47e/GithubPricing.png 600w,\n/static/c10409d55186f57a0d7d689007fb3107/c1b63/GithubPricing.png 1200w,\n/static/c10409d55186f57a0d7d689007fb3107/d61c2/GithubPricing.png 1800w,\n/static/c10409d55186f57a0d7d689007fb3107/97a96/GithubPricing.png 2400w,\n/static/c10409d55186f57a0d7d689007fb3107/a2b91/GithubPricing.png 3360w\"\n        sizes=\"(max-width: 1200px) 100vw, 1200px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"getting-started\" style=\"position:relative;\"><a href=\"#getting-started\" aria-label=\"getting started permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Getting Started</h2>\n<p>For starters, I'm going to assume you have a repo, preferably a Javascript repo, that you'll want to follow along with in this Github Actions Tutorial. In this run through I'm going to go over how to setup an automatic eslint checker for your code! Exciting stuff I know, so let's get started!</p>\n<h3 id=\"create-github-workflows-folder\" style=\"position:relative;\"><a href=\"#create-github-workflows-folder\" aria-label=\"create github workflows folder permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Create Github Workflows Folder</h3>\n<p>First things first we need to create the <code class=\"language-text\">.github/workflows</code> folders in the root of your repo. You can do this in your VS Code sidebar or by using the terminal with the following code:</p>\n<p> <code class=\"language-text\">mkdir .github/workflows</code></p>\n<p>This is where all your Github Actions live in your repo. By adding this folder we are letting Github know that there are actions inside this repo that it needs to be executed the next time you push up your code.</p>\n<h3 id=\"create-our-first-github-action\" style=\"position:relative;\"><a href=\"#create-our-first-github-action\" aria-label=\"create our first github action permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Create Our First Github Action</h3>\n<p>Next, let's go ahead and create our file. Github Actions use YAML files for configuration so our file will end with <code class=\"language-text\">.yml</code>. In this case let's call just call it <code class=\"language-text\">eslint.yml</code>, again you can create it in VS Code or using the following command:</p>\n<p><code class=\"language-text\">touch .github/workflows/eslint.yml</code></p>\n<p>Go ahead and open your new file and let's start coding!</p>\n<h3 id=\"name-our-workflow\" style=\"position:relative;\"><a href=\"#name-our-workflow\" aria-label=\"name our workflow permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Name Our Workflow</h3>\n<p>The first thing we need to add is name of our Github Action Workflow. Like this:</p>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token comment\"># eslint.yml</span>\n\n<span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Our First Eslint Checker 👶</code></pre></div>\n<h3 id=\"specify-when-our-workflow-should-trigger\" style=\"position:relative;\"><a href=\"#specify-when-our-workflow-should-trigger\" aria-label=\"specify when our workflow should trigger permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Specify When Our Workflow Should Trigger</h3>\n<p>Next, we are going to define when this action should trigger. There are a couple options here, but we're going to go with whenever a <strong>Pull Request</strong> is <strong>created</strong> or <strong>updated</strong>, which we specify in the file using the <code class=\"language-text\">on</code> keyword:</p>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token comment\"># eslint.yml</span>\n\n<span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Our First Eslint Checker 👶\n\n<span class=\"token key atrule\">on</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">pull_request</span><span class=\"token punctuation\">:</span>\n    <span class=\"token key atrule\">branches</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span> main <span class=\"token punctuation\">]</span> <span class=\"token comment\"># PRs to main only</span></code></pre></div>\n<h3 id=\"setup-our-workflow-environment\" style=\"position:relative;\"><a href=\"#setup-our-workflow-environment\" aria-label=\"setup our workflow environment permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Setup Our Workflow Environment</h3>\n<p>Ok, the last thing we have to do before we get to the meat of it is specify the environment or virtual machine we want our CI to run in. For most cases using ubuntu-latest is going to be our best bet. So, let's do that:</p>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token comment\"># eslint.yml</span>\n\n<span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Our First Eslint Checker 👶\n\n<span class=\"token key atrule\">on</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">pull_request</span><span class=\"token punctuation\">:</span>\n    <span class=\"token key atrule\">branches</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span> main <span class=\"token punctuation\">]</span> <span class=\"token comment\"># PRs to main only</span>\n\n<span class=\"token key atrule\">jobs</span><span class=\"token punctuation\">:</span> <span class=\"token comment\"># Jobs to be run</span>\n  <span class=\"token key atrule\">run-linters</span><span class=\"token punctuation\">:</span> <span class=\"token comment\"># Name of job (pretty arbitrary can be called basically anything)</span>\n    <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Lint Frontend <span class=\"token comment\"># (!Important) This name will show up in the Github UI so its important</span>\n    <span class=\"token key atrule\">runs-on</span><span class=\"token punctuation\">:</span> ubuntu<span class=\"token punctuation\">-</span>latest <span class=\"token comment\"># Virtual env to use</span></code></pre></div>\n<h3 id=\"define-our-workflow-steps\" style=\"position:relative;\"><a href=\"#define-our-workflow-steps\" aria-label=\"define our workflow steps permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Define Our Workflow Steps</h3>\n<p>Ok last, but not least, we get to define the steps that our action should take to perform our linting task. These steps operate very similarly to pseudo code, because each step has a name (which will be visible in the Github UI for debugging) and an action that it executes. The actions can either be a command that the terminal will execute or better yet, you can it can execute an entire plugin from the Github Marketplace. So let's go ahead and layout our actions in a step-by-step manner:</p>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token comment\"># eslint.yml</span>\n\n<span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Our First Eslint Checker 👶\n\n<span class=\"token key atrule\">on</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">pull_request</span><span class=\"token punctuation\">:</span>\n    <span class=\"token key atrule\">branches</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span> main <span class=\"token punctuation\">]</span> <span class=\"token comment\"># PRs to main only</span>\n\n<span class=\"token key atrule\">jobs</span><span class=\"token punctuation\">:</span> <span class=\"token comment\"># Jobs to be run</span>\n  <span class=\"token key atrule\">run-linters</span><span class=\"token punctuation\">:</span> <span class=\"token comment\"># Name of job (pretty arbitrary can be called basically anything)</span>\n    <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Lint Code <span class=\"token comment\"># (!Important) This name will show up in the Github UI so its important</span>\n    <span class=\"token key atrule\">runs-on</span><span class=\"token punctuation\">:</span> ubuntu<span class=\"token punctuation\">-</span>latest <span class=\"token comment\"># Virtual env to use</span>\n\n    <span class=\"token key atrule\">steps</span><span class=\"token punctuation\">:</span>\n      <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Check out Git repository <span class=\"token comment\"># The first step of most actions is going to </span>\n        <span class=\"token key atrule\">uses</span><span class=\"token punctuation\">:</span> actions/checkout@v2      <span class=\"token comment\"># use this plugin to clone the repo to the virtual machine</span>\n\n      <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Set up Node.js <span class=\"token comment\"># Secondarily because this is a javascript ecosystem we need to install node</span>\n        <span class=\"token key atrule\">uses</span><span class=\"token punctuation\">:</span> actions/setup<span class=\"token punctuation\">-</span>node@v1 <span class=\"token comment\"># This plugin takes care of that for us</span>\n        <span class=\"token key atrule\">with</span><span class=\"token punctuation\">:</span>\n          <span class=\"token key atrule\">node-version</span><span class=\"token punctuation\">:</span> <span class=\"token number\">12</span> <span class=\"token comment\"># Some plugins allow for configuration like this</span>\n\n      <span class=\"token comment\"># Install our packages now that we have node</span>\n      <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Install Node.js dependencies\n        <span class=\"token key atrule\">run</span><span class=\"token punctuation\">:</span> npx yarn install <span class=\"token comment\"># I use npx here so I don't have to install yarn globally on this VM</span>\n\n      <span class=\"token comment\"># Lint the folder system</span>\n      <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> Lint Code\n        <span class=\"token key atrule\">run</span><span class=\"token punctuation\">:</span> yarn eslint . <span class=\"token comment\"># You could customize this line to use whatever options you needed.</span></code></pre></div>\n<p>And there you have it. Go ahead and create a PR with these changes and you will see the Github Action takes no time in telling you about all your eslint errors!</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 1200px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/61c824df0e0bdd988d8445339382fa92/c9d77/ActionScreenshot.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 21.333333333333336%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAyUlEQVQY022P22oDMQxE9/9/rFAKeelrKQlNdiPfLV92nXinWkPzVMFhkDWMrKn3jvZ4gHNFGpQXzgc452Gtg7F2aIw8IFIgpaGEOxFqrdj3HdPH6RNv7yes5YLCM1JYhBk53sH+R940uhj/r33MYnkirR29S2CpK3KpqIlwu56hNclWgjELjJ7lFwQfIsrhWbfB4T/YtjYCa3tKaENrDdPfrpgyvr7PWJTFdVbjDGXs6G+LnKcdyDjYwHAxwYkGLtDWSy/qM5gZvyi/Mqw1hW+aAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Github Action in Action!\"\n        title=\"Github Action in Action!\"\n        src=\"/static/61c824df0e0bdd988d8445339382fa92/c1b63/ActionScreenshot.png\"\n        srcset=\"/static/61c824df0e0bdd988d8445339382fa92/5a46d/ActionScreenshot.png 300w,\n/static/61c824df0e0bdd988d8445339382fa92/0a47e/ActionScreenshot.png 600w,\n/static/61c824df0e0bdd988d8445339382fa92/c1b63/ActionScreenshot.png 1200w,\n/static/61c824df0e0bdd988d8445339382fa92/d61c2/ActionScreenshot.png 1800w,\n/static/61c824df0e0bdd988d8445339382fa92/c9d77/ActionScreenshot.png 1964w\"\n        sizes=\"(max-width: 1200px) 100vw, 1200px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n  </a>\n    </span></p>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Conclusion</h2>\n<p>There is so much more you can do with Github Actions, and I will probably create more tutorials in the future taking about this in more depth, so stay turned for those upcoming posts. If you have any more questions feel free to reach out either via my contact page or better yet leave a comment below and I'd be happy to help you in anyway I can!</p>"},"primaryTag":{"name":"DevOps","color":"#3232FF"}},"pageContext":{"postId":"c1a9e7cf-9fd6-5e1a-8571-f13c8e00bedc","primaryTag":"DevOps"}},"staticQueryHashes":["1116962356","2041457101","2275848304","2775657032","545095672"]}