starter-workflows README

The project's README from github.com/actions/starter-workflows. As one markdown file: README.md.

Starter Workflows

These are the workflow files for helping people get started with GitHub Actions. They're presented whenever you start to create a new GitHub Actions workflow.

If you want to get started with GitHub Actions, you can use these starter workflows by clicking the "Actions" tab in the repository where you want to create a workflow.

Note

Thank you for your interest in this GitHub repo, however, right now we are not taking contributions.

We continue to focus our resources on strategic areas that help our customers be successful while making developers' lives easier. While GitHub Actions remains a key part of this vision, we are allocating resources towards other areas of Actions and are not taking contributions to this repository at this time. The GitHub public roadmap is the best place to follow along for any updates on features we’re working on and what stage they’re in.

We are taking the following steps to better direct requests related to GitHub Actions, including:

  1. We will be directing questions and support requests to our Community Discussions area

  2. High Priority bugs can be reported through Community Discussions or you can report these to our support team https://support.github.com/contact/bug-report.

  3. Security Issues should be handled as per our security.md

We will still provide security updates for this project and fix major breaking changes during this time.

You are welcome to still raise bugs in this repo.

Directory structure

Each workflow must be written in YAML and have a .yml extension. They also need a corresponding .properties.json file that contains extra metadata about the workflow (this is displayed in the GitHub.com UI).

For example: ci/django.yml and ci/properties/django.properties.json.

Valid properties

Categories

Variables

These variables can be placed in the starter workflow and will be substituted as detailed below:

How to test templates before publishing

Disable template for public

The template author adds a labels array in the template's properties.json file with a label preview. This will hide the template from users, unless user uses query parameter preview=true in the URL. Example properties.json file:

{
    "name": "Node.js",
    "description": "Build and test a Node.js project with npm.",
    "iconName": "nodejs",
    "categories": ["Continuous integration", "JavaScript", "npm", "React", "Angular", "Vue"],
    "labels": ["preview"]
}

For viewing the templates with preview label, provide query parameter preview=true to the new workflow page URL. Eg. https://github.com/<owner>/<repo_name>/actions/new?preview=true.

Enable template for public

Remove the labels array from properties.json file to publish the template to public

starter-workflows (actions/starter-workflows)

Searching Database…

这是什么?这是 GitHub Actions 官方的入门工作流模板合集,在仓库的 Actions 标签页中新建工作流时会显示。
这是一个程序库,还是只是一组模板文件?这是一个 YAML 工作流模板库,按类别(ci、deployments、automation、code-scanning、pages)整理,每个模板都配有一个 .properties.json 元数据文件。它不是需要安装的程序库。
我怎样在自己的仓库里使用这些入门工作流?进入仓库的 “Actions” 标签页,点击新建工作流;GitHub 会自动从本仓库推荐相关的入门模板。
我要在这里添加自己的模板,需要准备什么?每个新模板都需要一个扩展名为 .yml 的 YAML 文件,以及一个同名的 .properties.json 文件,用来定义 name、description、iconName、creator、categories 等字段。
新模板在公开之前,我怎样预览?在模板的 properties.json 中添加值为 preview 的 labels 数组。之后该模板会保持隐藏,除非用户通过 preview=true 查询参数打开新建工作流页面。
$default-branch 这类特殊变量有什么作用?$default-branch、$protected-branches、$cron-daily 等占位符会自动替换为仓库的实际默认分支、受保护分支,或随机化的每日 cron 时间。
模板可以归入哪些类别?模板可以归入 continuous-integration、deployment、testing、code-quality、code-review、dependency-management、monitoring、automation、utilities、Pages、Hugo 等类别,此外还有编程语言和技术栈标签。
Creator
actions
Size
3.8 MB
Stars
12.2K
Updated
CommitAug 03
Age
7y
Commits · 90 Days