Skip to content

Commit

Permalink
Re-added content about workflow templates (github#17105)
Browse files Browse the repository at this point in the history
* Re-added content about workflow templates

* Apply suggestions from code review

Co-authored-by: Lucas Costi <[email protected]>

Co-authored-by: Lucas Costi <[email protected]>
  • Loading branch information
Martin Lopes and lucascosti authored Jan 8, 2021
1 parent f5a2c56 commit 0a37f55
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
11 changes: 11 additions & 0 deletions content/actions/learn-github-actions/managing-complex-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,17 @@ For more information, see ["Using labels with self-hosted runners](/actions/hos
You can configure environments with protection rules and secrets. Each job in a workflow can reference a single environment. Any protection rules configured for the environment must pass before a job referencing the environment is sent to a runner. For more information, see "[Environments](/actions/reference/environments)."
{% endif %}

### Using a workflow template

{% data reusables.actions.workflow-template-overview %}

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
1. If your repository already has existing workflows: In the upper-left corner, click **New workflow**.
![Create a new workflow](/assets/images/help/repository/actions-new-workflow.png)
1. Under the name of the template you'd like to use, click **Set up this workflow**.
![Set up this workflow](/assets/images/help/settings/actions-create-starter-workflow.png)

### Next steps

To continue learning about {% data variables.product.prodname_actions %}, see "[Sharing workflows with your organization](/actions/learn-github-actions/sharing-workflows-with-your-organization)."
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ This procedure demonstrates how to create a workflow template and metadata file.

```yaml
name: Octo Organization CI

on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Run a one-line script
run: echo Hello from Octo Organization
- uses: actions/checkout@v2

- name: Run a one-line script
run: echo Hello from Octo Organization
```
1. Create a metadata file inside the `workflow-templates` directory. The metadata file must have the same name as the workflow file, but instead of the `.yml` extension, it must be appended with `.properties.json`. For example, this file named `octo-organization-ci.properties.json` contains the metadata for a workflow file named `octo-organization-ci.yml`:
```yaml
Expand Down Expand Up @@ -75,7 +75,7 @@ To add another workflow template, add your files to the same `workflow-templates

![Workflow template files](/assets/images/help/images/workflow-template-files.png)

### Using a workflow template
### Using a workflow template from your organization

This procedure demonstrates how a member of your organization can find and use a workflow template to create a new workflow. An organization's workflow templates can be used by anyone who is a member of the organization.

Expand Down
8 changes: 4 additions & 4 deletions content/actions/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ Committing the workflow file in your repository triggers the `push` event and ru
{% endif %}
{% data reusables.repositories.view-failed-job-results-superlinter %}
### More starter workflows
### More workflow templates
{% data variables.product.prodname_dotcom %} provides preconfigured workflow templates that you can start from to automate or create a continuous integration workflows. You can browse the full list of workflow templates in the {% if currentVersion == "free-pro-team@latest" %}[actions/starter-workflows](https://github.com/actions/starter-workflows) repository{% else %} `actions/starter-workflows` repository on {% data variables.product.product_location %}{% endif %}.
{% data reusables.actions.workflow-template-overview %}
### Next steps
Expand Down Expand Up @@ -134,9 +134,9 @@ Printing "Hello, World!" is a great way to explore the basic set up and syntax o
1. In the workflow logs, expand the 'Run echo "Hello World!"' section.
![Workflow detail](/assets/images/help/repository/workflow-log-listing.png)
### More starter workflows
### More workflow templates
{% data variables.product.prodname_dotcom %} provides preconfigured workflow templates that you can start from to automate or create a continuous integration workflows. You can browse the full list of workflow templates in the {% if currentVersion == "free-pro-team@latest" %}[actions/starter-workflows](https://github.com/actions/starter-workflows) repository{% else %} `actions/starter-workflows` repository on {% data variables.product.product_location %}{% endif %}.
{% data reusables.actions.workflow-template-overview %}
### Next steps
Expand Down
3 changes: 3 additions & 0 deletions data/reusables/actions/workflow-template-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% data variables.product.prodname_dotcom %} provides preconfigured workflow templates that you can customize to create your own continuous integration workflow. {% data variables.product.product_name %} analyzes your code and shows you CI templates that might be useful for your repository. For example, if your repository contains Node.js code, you'll see suggestions for Node.js projects. You can use workflow templates as a starting place to build your custom workflow or use them as-is.

You can browse the full list of workflow templates in the {% if currentVersion == "free-pro-team@latest" %}[actions/starter-workflows](https://github.com/actions/starter-workflows) repository{% else %} `actions/starter-workflows` repository on {% data variables.product.product_location %}{% endif %}.

0 comments on commit 0a37f55

Please sign in to comment.