惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
Last Week in AI
Last Week in AI
The Cloudflare Blog
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
S
SegmentFault 最新的问题
量子位
大猫的无限游戏
大猫的无限游戏
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
I
InfoQ
人人都是产品经理
人人都是产品经理
G
Google Developers Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Engineering at Meta
Engineering at Meta

The latest on automation - The GitHub Blog

Improving token efficiency in GitHub Agentic Workflows Automate repository tasks with GitHub Agentic Workflows How to streamline GitHub API calls in Azure Pipelines Cloud migration made easy: introducing GitHub Enterprise Importer Dependabot Updates hit GA in GHES One developer’s journey bringing Dependabot to GitHub Enterprise Server Automating MySQL schema migrations with GitHub Actions and more Powering community-led innovation with GitHub Actions A thousand community-powered workflows using GitHub Actions
Promote consistency across your organization with workflo...
Jennifer Schelkopf · 2020-06-22 · via The latest on automation - The GitHub Blog

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.

Screenshot showing a series of workflows created by Waldocat

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.

Screenshot showing matching workflows

After clicking ‘Set up this workflow’, you will see the workflow template and can customize it to meet your requirements.

Screenshot showing editing a workllow file

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

Jennifer Schelkopf

Related posts

Explore more from GitHub

Docs

Docs

Everything you need to master GitHub, all in one place.

Go to Docs

GitHub

GitHub

Build what’s next on GitHub, the place for anyone from anywhere to build anything.

Start building

Customer stories

Customer stories

Meet the companies and engineering teams that build with GitHub.

Learn more

The GitHub Podcast

The GitHub Podcast

Catch up on the GitHub podcast, a show dedicated to the topics, trends, stories and culture in and around the open source developer community on GitHub.

Listen now