Promote consistency across your organization with workflow templates
Now you can create custom workflow templates to promote best practices and consistency across your organization.
![](https://github.blog/wp-content/uploads/2019/03/company-twitter.png?resize=1201%2C630)
Workflow templates make it easy for people to get started with GitHub Actions. They’re presented whenever you create a new GitHub Actions workflow, and provide examples of CI/CD across many different languages as well as general automation. Now enterprises and OSS teams can define custom workflow templates for their organization.
Creating workflow templates
Workflow templates extend GitHub’s config-as-code capabilities. Like issue templates, workflow templates are defined in a .github repository, enabling you to leverage all the power of GitHub’s collaborative capabilities and providing full audibility. Each template is defined through a yaml file that looks just like the workflow yaml files you’re used to. In addition, a properties file specifies template-specific metadata, such as a description and icon.
Matching workflow templates to repositories
You can optionally define rules for which repositories are a best fit for the template. While a user can see all the templates defined at the organization, workflows that are matched to their repository will be promoted as “Suggested”.
For example, you can specify a template as being appropriate for Go projects. Then when a user goes to add a workflow to a Go repository this template will appear in the “Suggested” section of the GitHub interface.
You can also define regex expressions to match files in the repository’s root directory. For example, if you set “filePatterns”: “action.yml” then your template will be matched to repositories that contain either JavaScript or Docker container actions.
Using a workflow template
A workflow template can be used by any repository within the organization for enterprise accounts, or any public repository across all GitHub plans.
Workflow templates that match the repository appear in “Suggested”, and all others appear in a section for the organization.
After clicking ‘Set up this workflow’, you will see the workflow template and can customize it to meet your requirements.
Workflow templates can be shared with any public repository within the organization. They can also be shared with private repositories if the organization is part of an enterprise or GitHub One plan.
Learn more about organization workflow templates
Written by
Related posts
![](https://github.blog/wp-content/uploads/2023/10/Enterprise-LightMode-4.png?resize=400%2C212)
GitHub Enterprise: The best migration path from AWS CodeCommit
AWS CodeCommit is discontinuing new customer access and will no longer introduce new features. Learn how to migrate to GitHub Enterprise and why it’s the best option for you.
![](https://github.blog/wp-content/uploads/2024/04/Enterprise-DarkMode-2-3.png?resize=400%2C212)
GitHub Actions, Arm64, and the future of automotive software development
Learn how GitHub’s Enterprise Cloud, GitHub Actions, and Arm’s latest Automotive Enhanced processors, work together to usher in a new era of efficient, scalable, and flexible automotive software creation.
![A schematic diagram depicting the steps an SAST tool takes to scan the source code of an SQL application under an SQL injection attack. The first step is tokenizing the source code, the second is abstracting the source code, the third conducting semantic analysis, the fourth conducting taint analysis, and the last generating a security alert about the SQL injection vulnerability.](https://github.blog/wp-content/uploads/2024/02/sast-tool-diagram.png?resize=400%2C212)
The architecture of SAST tools: An explainer for developers
More developers will have to fix security issues in the age of shifting left. Here, we break down how SAST tools can help them find and address vulnerabilities.