Skip to main content

Using workflow templates

GitHub Enterprise Server provides workflow templates for a variety of languages and tooling.

注: GitHub ホステッド ランナーは、現在 GitHub Enterprise Server でサポートされていません。 GitHub public roadmap で、今後の計画的なサポートの詳細を確認できます。

About workflow templates

Workflow templates are templates that help you to create your own GitHub Actions workflows for a repository. They offer an alternative to starting from a blank workflow file and are useful because some of the work will already have been done for you.

GitHub Enterprise Server offers workflow templates for a variety of languages and tooling. When you set up workflows in your repository, GitHub Enterprise Server 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, GitHub Enterprise Server will suggest a workflow template file that installs your Node.js packages and runs your tests. You can search and filter to find relevant workflow templates.

GitHub には、次の高レベルのカテゴリにすぐに使用できるワークフロー テンプレートが用意されています。

  • デプロイ (CD) 。 詳しくは、「About continuous deployment with GitHub Actions」を参照してください。

  • 継続的インテグレーション (CI) 。 詳しくは、「About continuous integration with GitHub Actions」を参照してください。

  • オートメーション。 Automation ワークフロー テンプレートには、pull request のトリアージや、pull request で変更されたパスに基づくラベルの適用、リポジトリに初めて投稿する人へのあいさつなど、ワークフローを自動化するためのソリューションが用意されています。

Use these workflows 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 actions/starter-workflows repository. For more information, see "Using workflow templates."

You can also create your own workflow template to share with your organization. These workflow templates will appear alongside the GitHub Enterprise Server-provided workflow templates. Anyone with write access to the organization's github repository can set up a workflow template. For more information, see "組織のワークフロー テンプレートを作成する."

Choosing and using a workflow template

  1. GitHub で、リポジトリのメイン ページに移動します。

  2. リポジトリ名の下にある [アクション] をクリックします。

    "github/docs" リポジトリのタブのスクリーンショット。 [アクション] タブがオレンジ色の枠線で強調表示されています。

  3. ワークフローが既にリポジトリ内にある場合は、 [新しいワークフロー] をクリックします。

  4. The "Choose a workflow" page shows a selection of recommended workflow templates. Find the workflow template that you want to use, then click Configure. To help you find the workflow template that you want, you can search for keywords or filter by category.

  5. If the workflow template contains comments detailing additional setup steps, follow these steps.

    There are guides to accompany many of the workflow templates for building and testing projects. For more information, see "ビルドとテスト."

  6. Some workflow templates use secrets. For example, ${{ secrets.npm_token }}. 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 "GitHub Actions でのシークレットの使用."

  7. Optionally, make additional changes. For example, you might want to change the value of on to change when the workflow runs.

  8. Click Start commit.

  9. Write a commit message and decide whether to commit directly to the default branch or to open a pull request.

Further reading