1
0
mirror of synced 2025-12-25 11:03:37 -05:00
Files
docs/content/actions/learn-github-actions/using-workflow-templates.md
2021-10-15 23:17:52 +00:00

3.2 KiB

title, shortTitle, intro, redirect_from, versions, type, topics
title shortTitle intro redirect_from versions type topics
Using workflow templates Using templates {% data variables.product.product_name %} provides workflow templates for a variety of languages and tooling.
/articles/setting-up-continuous-integration-using-github-actions
/github/automating-your-workflow-with-github-actions/setting-up-continuous-integration-using-github-actions
/actions/automating-your-workflow-with-github-actions/setting-up-continuous-integration-using-github-actions
/actions/building-and-testing-code-with-continuous-integration/setting-up-continuous-integration-using-github-actions
/actions/guides/setting-up-continuous-integration-using-workflow-templates
fpt ghes ghae ghec
* * * *
tutorial
Workflows
CI
CD

{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} {% data reusables.actions.ae-beta %}

About workflow templates

{% data variables.product.product_name %} offers workflow templates for a variety of languages and tooling. When you set up workflows in your repository, {% data variables.product.product_name %} analyzes the code in your repository and recommends workflows based on the language and framework in your repository. For example, if you use Node.js, {% data variables.product.product_name %} will suggest a template file that installs your Node.js packages and runs your tests.

You can also create your own workflow templates to share with your organization. For more information, see "Creating workflow templates."

Using workflow templates

Anyone with write permission to a repository can set up {% data variables.product.prodname_actions %} workflows for CI/CD or other automation.

{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %}

  1. If you already have a workflow in your repository, click New workflow.
  2. Find the template that you want to use, then click Set up this workflow.
  3. If the workflow template contains comments detailing additional setup steps, follow these steps.
  4. Some workflow templates use secrets. For example, {% raw %}${{ secrets.npm_token }}{% endraw %}. If the workflow template uses a secret, store the value described in the secret name as a secret in your repository. For more information, see "Encrypted secrets."
  5. Optionally, make additional changes. For example, you might want to change the value of on to change when the workflow runs.
  6. Click Start commit.
  7. Write a commit message and decide whether to commit directly to the default branch or to open a pull request.

Further reading