{"id":62982,"date":"2022-02-10T09:56:42","date_gmt":"2022-02-10T17:56:42","guid":{"rendered":"https:\/\/github.blog\/?p=62982"},"modified":"2024-07-23T10:18:45","modified_gmt":"2024-07-23T17:18:45","slug":"using-reusable-workflows-github-actions","status":"publish","type":"post","link":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/","title":{"rendered":"How to start using reusable workflows with GitHub Actions"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<html><body><p>From automating repetitive tasks to building continuous integration and continuous deployment pipelines, you can do a lot with GitHub Actions.<\/p>\n<p>But until recently, you had to copy and paste YAML files from one repository to another if you wanted to use them in more than one place.<\/p>\n<p>Enter <a href=\"https:\/\/github.blog\/2021-11-29-github-actions-reusable-workflows-is-generally-available\/\">reusable workflows<\/a>, which officially launched in 2021 and offer a simple and powerful way to avoid copying and pasting workflows across your repositories.<\/p>\n<p>Below, I&rsquo;ll go over some of the benefits of reusable workflows and how to use them. I&rsquo;ll also talk through how reusable workflows are different from <a href=\"https:\/\/github.blog\/changelog\/2021-08-25-github-actions-reduce-duplication-with-action-composition\/\">composite actions<\/a> and some current limitations.<\/p>\n<aside class=\"post-aside--small float-sm-right col-sm-5 col-md-6 col-lg-5 my-5 my-sm-2 ml-sm-4 ml-lg-6\"><p class=\"h6-mktg gh-aside-title\">New to GitHub Actions?<\/p><p>If you haven&rsquo;t used Actions before, don&rsquo;t start your learning journey with reusable workflows. It will drive you crazy. Try learning more about GitHub Actions first <a href=\"https:\/\/resources.github.com\/devops\/tools\/automation\/actions\">in our guide<\/a> (and then maybe try doing <a href=\"https:\/\/github.blog\/2021-11-04-10-github-actions-resources-basics-ci-cd\/\">even more things<\/a> with them).<\/p>\n<\/aside>\n<h2 id=\"what-are-the-benefits-of-using-reusable-workflows\" id=\"what-are-the-benefits-of-using-reusable-workflows\" ><a class=\"heading-link\" href=\"#what-are-the-benefits-of-using-reusable-workflows\">What are the benefits of using reusable workflows?<span class=\"heading-hash pl-2 text-italic text-bold\" aria-hidden=\"true\"><\/span><\/a><\/h2>\n<ul>\n<li><strong>Reusable workflows are &hellip; reusable.<\/strong> Reusable workflows let you DRY (don&rsquo;t repeat yourself) your Actions configurations, so you don&rsquo;t need to copy and paste your workflows from one repository to another.<\/li>\n<\/ul>\n<p>Case in point: if you have three different Node applications and you&rsquo;re building them all the same way, you can use one reusable workflow instead of copying and pasting your workflows again and again.<\/p>\n<ul>\n<li><strong>Reusable workflows can enforce context consistency across environments.<\/strong> When <a href=\"https:\/\/github.blog\/2021-11-29-github-actions-reusable-workflows-is-generally-available\/\">combined with OpenID Connect<\/a>, reusable workflows allow you to require certain tests to be run before code can be deployed to production.<\/li>\n<\/ul>\n<p>Let&rsquo;s say, for example, that you have a cloud-hosted database and your applications are going to run database migrations when they&rsquo;re deployed. You can put a policy in front of that database requiring that a specific reusable workflow is used before any deployment.<\/p>\n<h2 id=\"how-to-make-any-github-actions-workflow-reusable\" id=\"how-to-make-any-github-actions-workflow-reusable\" ><a class=\"heading-link\" href=\"#how-to-make-any-github-actions-workflow-reusable\">How to make any GitHub Actions workflow reusable<span class=\"heading-hash pl-2 text-italic text-bold\" aria-hidden=\"true\"><\/span><\/a><\/h2>\n<h3 id=\"step-1-add-a-workflow_call-trigger\" id=\"step-1-add-a-workflow_call-trigger\" ><a class=\"heading-link\" href=\"#step-1-add-a-workflow_call-trigger\">Step 1: Add a workflow_call trigger<span class=\"heading-hash pl-2 text-italic text-bold\" aria-hidden=\"true\"><\/span><\/a><\/h3>\n<p>A reusable workflow is just like any GitHub Actions workflow with one key difference: it includes a <code>workflow_call<\/code> trigger.<\/p>\n<p>That means all you need to do is add in the following syntax to any action&rsquo;s YAML workflow file:<\/p>\n<pre><code>on:\nworkflow_call:\n<\/code><\/pre>\n<p>You can then reference this workflow in another workflow by adding in this syntax:<\/p>\n<pre><code>Uses:\nUSER_OR_ORG_NAME\/REPO_NAME\/.github\/workflows\/REUSABLE_WORKFLOW_FILE.yml@TAG_OR_BRANCH\n<\/code><\/pre>\n<p>You can also pass data such as job information or passwords to a reusable workflow by using inputs and secret triggers. Inputs are used to pass non-sensitive information while secrets are used to pass along sensitive information such as passwords and credentials. You can <a href=\"https:\/\/docs.github.com\/en\/actions\/using-workflows\/reusing-workflows#using-inputs-and-secrets-in-a-reusable-workflow\">learn more about that in our docs<\/a>.<\/p>\n<h3 id=\"step-2-make-your-actions-accessible-across-your-organization\" id=\"step-2-make-your-actions-accessible-across-your-organization\" ><a class=\"heading-link\" href=\"#step-2-make-your-actions-accessible-across-your-organization\">Step 2: Make your actions accessible across your organization<span class=\"heading-hash pl-2 text-italic text-bold\" aria-hidden=\"true\"><\/span><\/a><\/h3>\n<p>After you add a <code>workflow_call<\/code> trigger, you need to make sure that your repositories in your organization have access to it. To do this, go to your repository settings, select <strong>Actions<\/strong>, and enable access to repositories in your organization.<\/p>\n<figure id=\"attachment_63012\"  class=\"wp-caption alignnone mx-0\"><img data-recalc-dims=\"1\" decoding=\"async\" loading=\"lazy\" class=\"width-fit size-full wp-image-63012 width-fit\" src=\"https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/enabling-access-github-actions-org-level.png?h=301\" alt=\"Enabling access for GitHub Actions at the organization level\"  srcset=\"https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/enabling-access-github-actions-org-level.png?w=658 658w, https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/enabling-access-github-actions-org-level.png?w=300 300w\" sizes=\"(max-width: 658px) 100vw, 658px\" \/><figcaption class=\"text-mono color-fg-muted mt-14px f5-mktg\">Enabling access for GitHub Actions at the organization level<\/figcaption><\/figure>\n<aside class=\"p-4 p-md-6 post-aside--large\"><p class=\"h5-mktg gh-aside-title\">A real-world example with reusable workflows<\/p><p>\nWhile building a new repository to develop <a href=\"https:\/\/hot.opensauced.pizza\/\">hot.opensauced.pizza<\/a>, I needed to centralize my GitHub Actions compliance workflows (and avoid copying and pasting because who wants to do that when they can avoid it?).<br \/>\nTo do this, I added a <code>workflow_call<\/code> trigger to my original YAML workflow file in my open-sauced repository. You can see that <a href=\"https:\/\/github.com\/open-sauced\/open-sauced\/blob\/main\/.github\/workflows\/compliance.yml\">here in my YAML file<\/a>&mdash;or in the code snippet below.<\/p>\n<pre><code>\nname: Compliance\n\non:\n  pull_request_target:\n    types:\n      - opened\n      - edited\n      - synchronize\n      - reopened\n  workflow_call:\n<\/code><\/pre>\n<p>Next, I built a new YAML workflow in my hot.opensauced.pizza repository and had it call back to my reusable compliance workflow. It looked like this (and you can <a href=\"https:\/\/github.com\/open-sauced\/hot\/blob\/main\/.github\/workflows\/compliance.yml\">check out the YAML file here<\/a>):<\/p>\n<pre><code>\nname: \"Compliance\"\n\non:\n  pull_request_target:\n    types:\n      - opened\n      - edited\n      - synchronize\n\npermissions:\n  pull-requests: write\n\njobs:\n  compliance:\n    uses: open-sauced\/open-sauced\/.github\/workflows\/compliance.yml@main\n<\/code><\/pre>\n<p><strong>Why this matters:<\/strong> Reusable workflows helped provide consistency across my projects and made my life easier. By copying and pasting a few key YAML files from one project to another, I was immediately good to go on day one.<\/p>\n<\/aside>\n<\/p><h2 id=\"some-limitations-with-reusable-workflows\" id=\"some-limitations-with-reusable-workflows\" ><a class=\"heading-link\" href=\"#some-limitations-with-reusable-workflows\">Some limitations with reusable workflows<span class=\"heading-hash pl-2 text-italic text-bold\" aria-hidden=\"true\"><\/span><\/a><\/h2>\n<p>There are <a href=\"https:\/\/docs.github.com\/en\/actions\/using-workflows\/reusing-workflows#limitations\">some limitations with reusable workflows<\/a>. I want to call out a few to keep in mind:<\/p>\n<ul>\n<li><strong>You can&rsquo;t reference a reusable workflow that&rsquo;s in a private repository<\/strong>. If you have a reusable workflow in a private repository, only other workflows in that private repository can use it.\n<\/li>\n<li>\n<p><strong>Reusable workflows can be nested<\/strong>. From within a reusable workflow you can call another reusable workflow and you can connect up to four levels of workflows.<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"reusable-workflows-vs-composite-actions\" id=\"reusable-workflows-vs-composite-actions\" ><a class=\"heading-link\" href=\"#reusable-workflows-vs-composite-actions\">Reusable workflows vs. composite actions<span class=\"heading-hash pl-2 text-italic text-bold\" aria-hidden=\"true\"><\/span><\/a><\/h2>\n<p>When we launched reusable workflows, one of the first questions we got was around how they&rsquo;re different from composite actions.<\/p>\n<p>For the uninitiated, <a href=\"https:\/\/github.blog\/changelog\/2021-08-25-github-actions-reduce-duplication-with-action-composition\/\">composite actions<\/a> enable you to combine multiple actions into a single action that you can then insert into any workflow. This means you can refactor long YAML workflow files into much smaller files&mdash;and you can also save yourself a fair amount of copying and pasting. Plus, if something like your credentials change, you won&rsquo;t have to update an entire YAML file.<\/p>\n<p>In practice, there are kinds of problems you can solve with either reusable workflows or a composite workflow. Both approaches have individual strengths and weaknesses. 80% of the time you can probably use either one. But 20% of the time, you&rsquo;ll need to use one or the other.<\/p>\n<p>For example, if your job needs to run on a specific runner or machine, you need to use reusable workflows. Composite actions don&rsquo;t specify this type of thing. Composite actions are intended to be more isolated and generic.<\/p>\n<h3 id=\"key-differences-between-reusable-workflows-and-composite-actions\" id=\"key-differences-between-reusable-workflows-and-composite-actions\" ><a class=\"heading-link\" href=\"#key-differences-between-reusable-workflows-and-composite-actions\">Key differences between reusable workflows and composite actions<span class=\"heading-hash pl-2 text-italic text-bold\" aria-hidden=\"true\"><\/span><\/a><\/h3>\n<div data-target=\"content-table-wrap.container\" class=\"content-table-wrap\"><content-table-wrap><table>\n<tbody>\n<tr>\n<td><strong>Reusable workflows<\/strong><\/td>\n<td><strong>Composite actions<\/strong><\/td>\n<\/tr>\n<tr>\n<td>Can connect a maximum of four levels of workflows<\/td>\n<td>Can be nested to have up to 10 composite actions in one workflow<\/td>\n<\/tr>\n<tr>\n<td>Can use secrets<\/td>\n<td>Cannot use secrets<\/td>\n<\/tr>\n<tr>\n<td>Can use if: conditionals<\/td>\n<td>Cannot use if: conditionals<\/td>\n<\/tr>\n<tr>\n<td>Can be stored as normal YAML files in your project<\/td>\n<td>Requires individual folders for each composite action<\/td>\n<\/tr>\n<tr>\n<td>Can use multiple jobs<\/td>\n<td>Cannot use multiple jobs<\/td>\n<\/tr>\n<tr>\n<td>Each step is logged in real-time<\/td>\n<td>Logged as one step even if it contains multiple steps<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/content-table-wrap><\/div>\n<p>With reusable workflows, you can have multiple jobs and that gives you a lot of more granular control&mdash;and power. They allow you to specify any number of things and customize them more to your liking.<\/p>\n<p>Reusable workflows also don&rsquo;t require individual folders for each workflow like composite actions do. This can make using reusable workflows simpler since you can avoid nesting a bunch of different folders like you&rsquo;d need to do with composite actions.<\/p>\n<h2 id=\"tldr\" id=\"tldr\" ><a class=\"heading-link\" href=\"#tldr\">TL;DR<span class=\"heading-hash pl-2 text-italic text-bold\" aria-hidden=\"true\"><\/span><\/a><\/h2>\n<p>The more things you can do to follow the DRY principle, the better. Reusable workflows make it simple to spin up new repositories and projects and immediately start using automation and CI\/CD workflows with GitHub Actions that you know will work. That saves you time, and it lets you focus more on what&rsquo;s important: writing great code.<\/p>\n<h3 id=\"additional-resources\" id=\"additional-resources\" ><a class=\"heading-link\" href=\"#additional-resources\">Additional resources<span class=\"heading-hash pl-2 text-italic text-bold\" aria-hidden=\"true\"><\/span><\/a><\/h3>\n<ul>\n<li><strong>[Guide] <a href=\"https:\/\/github.blog\/2022-02-02-build-ci-cd-pipeline-github-actions-four-steps\/\">How to build a CI\/CD pipeline with GitHub Actions<\/a><\/strong><\/li>\n<li><strong>[Blog] <a href=\"https:\/\/github.blog\/2021-11-04-10-github-actions-resources-basics-ci-cd\/\">10 GitHub Actions resources to bookmark<\/a><\/strong><\/li>\n<li><strong>[Blog] <a href=\"https:\/\/github.blog\/2021-11-18-7-advanced-workflow-automation-features-with-github-actions\/\">7 advanced workflow automation features with GitHub Actions<\/a><\/strong><\/li>\n<\/ul>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Reusable workflows offer a simple and powerful way to avoid copying and pasting workflows across your repositories. <\/p>\n","protected":false},"author":1564,"featured_media":63016,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_gh_post_show_toc":"yes","_gh_post_is_no_robots":"no","_gh_post_is_featured":"no","_gh_post_is_excluded":"no","_gh_post_is_unlisted":"no","_gh_post_related_link_1":"","_gh_post_related_link_2":"","_gh_post_related_link_3":"","_gh_post_sq_img":"https:\/\/github.blog\/wp-content\/uploads\/2022\/01\/GitHub-Product_teal-square-icon-e1644516262689.png","_gh_post_sq_img_id":"62576","_gh_post_cta_title":"","_gh_post_cta_text":"","_gh_post_cta_link":"","_gh_post_cta_button":"Click Here to Learn More","_gh_post_recirc_hide":"no","_gh_post_recirc_col_1":"gh-auto-select","_gh_post_recirc_col_2":"65301","_gh_post_recirc_col_3":"65308","_gh_post_recirc_col_4":"65316","_featured_video":"","_gh_post_additional_query_params":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false,"_links_to":"","_links_to_target":""},"categories":[3298,3302],"tags":[122],"coauthors":[1985],"class_list":["post-62982","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developer-skills","category-github","tag-github-actions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.7 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to start using reusable workflows with GitHub Actions - The GitHub Blog<\/title>\n<meta name=\"description\" content=\"Reusable workflows offer a simple and powerful way to avoid copying and pasting workflows across your repositories.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to start using reusable workflows with GitHub Actions\" \/>\n<meta property=\"og:description\" content=\"Reusable workflows offer a simple and powerful way to avoid copying and pasting workflows across your repositories.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/\" \/>\n<meta property=\"og:site_name\" content=\"The GitHub Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-10T17:56:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-23T17:18:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/Product-Community.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Brian Douglas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/Product-Community.png?fit=1200%2C630\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brian Douglas\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/\"},\"author\":{\"name\":\"Brian Douglas\",\"@id\":\"https:\\\/\\\/github.blog\\\/#\\\/schema\\\/person\\\/2493db453c5ba67ebddab15e1cce4f96\"},\"headline\":\"How to start using reusable workflows with GitHub Actions\",\"datePublished\":\"2022-02-10T17:56:42+00:00\",\"dateModified\":\"2024-07-23T17:18:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/\"},\"wordCount\":1155,\"image\":{\"@id\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/github.blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Product-Community@2x.png?fit=2400%2C1260\",\"keywords\":[\"GitHub Actions\"],\"articleSection\":[\"Developer skills\",\"GitHub\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/\",\"url\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/\",\"name\":\"How to start using reusable workflows with GitHub Actions - The GitHub Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/github.blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/github.blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Product-Community@2x.png?fit=2400%2C1260\",\"datePublished\":\"2022-02-10T17:56:42+00:00\",\"dateModified\":\"2024-07-23T17:18:45+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/github.blog\\\/#\\\/schema\\\/person\\\/2493db453c5ba67ebddab15e1cce4f96\"},\"description\":\"Reusable workflows offer a simple and powerful way to avoid copying and pasting workflows across your repositories.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/github.blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Product-Community@2x.png?fit=2400%2C1260\",\"contentUrl\":\"https:\\\/\\\/github.blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Product-Community@2x.png?fit=2400%2C1260\",\"width\":2400,\"height\":1260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/using-reusable-workflows-github-actions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/github.blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Developer skills\",\"item\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"GitHub\",\"item\":\"https:\\\/\\\/github.blog\\\/developer-skills\\\/github\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"How to start using reusable workflows with GitHub Actions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/github.blog\\\/#website\",\"url\":\"https:\\\/\\\/github.blog\\\/\",\"name\":\"The GitHub Blog\",\"description\":\"Updates, ideas, and inspiration from GitHub to help developers build and design software.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/github.blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/github.blog\\\/#\\\/schema\\\/person\\\/2493db453c5ba67ebddab15e1cce4f96\",\"name\":\"Brian Douglas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef9f4262dd1a95069e7761185868140a6dce0c0f8fce2b3ba24fa52b7e39683b?s=96&d=mm&r=g93bc40741f3912e2b5f41dea58d172db\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef9f4262dd1a95069e7761185868140a6dce0c0f8fce2b3ba24fa52b7e39683b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef9f4262dd1a95069e7761185868140a6dce0c0f8fce2b3ba24fa52b7e39683b?s=96&d=mm&r=g\",\"caption\":\"Brian Douglas\"},\"sameAs\":[\"https:\\\/\\\/briandouglas.me\\\/\"],\"url\":\"https:\\\/\\\/github.blog\\\/author\\\/bdougie\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to start using reusable workflows with GitHub Actions - The GitHub Blog","description":"Reusable workflows offer a simple and powerful way to avoid copying and pasting workflows across your repositories.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/","og_locale":"en_US","og_type":"article","og_title":"How to start using reusable workflows with GitHub Actions","og_description":"Reusable workflows offer a simple and powerful way to avoid copying and pasting workflows across your repositories.","og_url":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/","og_site_name":"The GitHub Blog","article_published_time":"2022-02-10T17:56:42+00:00","article_modified_time":"2024-07-23T17:18:45+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/Product-Community.png","type":"image\/png"}],"author":"Brian Douglas","twitter_card":"summary_large_image","twitter_image":"https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/Product-Community.png?fit=1200%2C630","twitter_misc":{"Written by":"Brian Douglas","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/#article","isPartOf":{"@id":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/"},"author":{"name":"Brian Douglas","@id":"https:\/\/github.blog\/#\/schema\/person\/2493db453c5ba67ebddab15e1cce4f96"},"headline":"How to start using reusable workflows with GitHub Actions","datePublished":"2022-02-10T17:56:42+00:00","dateModified":"2024-07-23T17:18:45+00:00","mainEntityOfPage":{"@id":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/"},"wordCount":1155,"image":{"@id":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/#primaryimage"},"thumbnailUrl":"https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/Product-Community@2x.png?fit=2400%2C1260","keywords":["GitHub Actions"],"articleSection":["Developer skills","GitHub"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/","url":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/","name":"How to start using reusable workflows with GitHub Actions - The GitHub Blog","isPartOf":{"@id":"https:\/\/github.blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/#primaryimage"},"image":{"@id":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/#primaryimage"},"thumbnailUrl":"https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/Product-Community@2x.png?fit=2400%2C1260","datePublished":"2022-02-10T17:56:42+00:00","dateModified":"2024-07-23T17:18:45+00:00","author":{"@id":"https:\/\/github.blog\/#\/schema\/person\/2493db453c5ba67ebddab15e1cce4f96"},"description":"Reusable workflows offer a simple and powerful way to avoid copying and pasting workflows across your repositories.","breadcrumb":{"@id":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/#primaryimage","url":"https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/Product-Community@2x.png?fit=2400%2C1260","contentUrl":"https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/Product-Community@2x.png?fit=2400%2C1260","width":2400,"height":1260},{"@type":"BreadcrumbList","@id":"https:\/\/github.blog\/developer-skills\/github\/using-reusable-workflows-github-actions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/github.blog\/"},{"@type":"ListItem","position":2,"name":"Developer skills","item":"https:\/\/github.blog\/developer-skills\/"},{"@type":"ListItem","position":3,"name":"GitHub","item":"https:\/\/github.blog\/developer-skills\/github\/"},{"@type":"ListItem","position":4,"name":"How to start using reusable workflows with GitHub Actions"}]},{"@type":"WebSite","@id":"https:\/\/github.blog\/#website","url":"https:\/\/github.blog\/","name":"The GitHub Blog","description":"Updates, ideas, and inspiration from GitHub to help developers build and design software.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/github.blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/github.blog\/#\/schema\/person\/2493db453c5ba67ebddab15e1cce4f96","name":"Brian Douglas","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef9f4262dd1a95069e7761185868140a6dce0c0f8fce2b3ba24fa52b7e39683b?s=96&d=mm&r=g93bc40741f3912e2b5f41dea58d172db","url":"https:\/\/secure.gravatar.com\/avatar\/ef9f4262dd1a95069e7761185868140a6dce0c0f8fce2b3ba24fa52b7e39683b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef9f4262dd1a95069e7761185868140a6dce0c0f8fce2b3ba24fa52b7e39683b?s=96&d=mm&r=g","caption":"Brian Douglas"},"sameAs":["https:\/\/briandouglas.me\/"],"url":"https:\/\/github.blog\/author\/bdougie\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/github.blog\/wp-content\/uploads\/2022\/02\/Product-Community@2x.png?fit=2400%2C1260","jetpack_shortlink":"https:\/\/wp.me\/pamS32-gnQ","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/posts\/62982","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/users\/1564"}],"replies":[{"embeddable":true,"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/comments?post=62982"}],"version-history":[{"count":40,"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/posts\/62982\/revisions"}],"predecessor-version":[{"id":76020,"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/posts\/62982\/revisions\/76020"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/media\/63016"}],"wp:attachment":[{"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/media?parent=62982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/categories?post=62982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/tags?post=62982"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/github.blog\/wp-json\/wp\/v2\/coauthors?post=62982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}