From c126eed09cf8ca98a8a1b62abc301da54909c816 Mon Sep 17 00:00:00 2001 From: Lucas Costi Date: Fri, 22 Apr 2022 17:09:59 +1000 Subject: [PATCH] Add "About workflows" article (#26520) --- ...ons-create-starter-workflow-updated-ui.png | Bin 0 -> 21444 bytes .../understanding-github-actions.md | 177 +----------------- ...orkflow-features.md => about-workflows.md} | 114 ++++++----- content/actions/using-workflows/index.md | 2 +- .../using-workflows/triggering-a-workflow.md | 9 +- .../using-starter-workflows.md | 6 +- data/features/actions-starter-template-ui.yml | 2 + data/reusables/actions/about-triggers.md | 8 + .../reusables/actions/about-workflows-long.md | 3 + .../workflow-basic-example-and-explanation.md | 172 +++++++++++++++++ 10 files changed, 263 insertions(+), 230 deletions(-) create mode 100644 assets/images/help/settings/actions-create-starter-workflow-updated-ui.png rename content/actions/using-workflows/{advanced-workflow-features.md => about-workflows.md} (51%) create mode 100644 data/reusables/actions/about-triggers.md create mode 100644 data/reusables/actions/about-workflows-long.md create mode 100644 data/reusables/actions/workflow-basic-example-and-explanation.md diff --git a/assets/images/help/settings/actions-create-starter-workflow-updated-ui.png b/assets/images/help/settings/actions-create-starter-workflow-updated-ui.png new file mode 100644 index 0000000000000000000000000000000000000000..4836f2a668d91b9ab20047e516369f40fe2fc9f2 GIT binary patch literal 21444 zcmZ^~1z1}_(=duV6lrm%Sb^Z~4#mB=yO!Wu9EwA6m*VaL3dNn^PJt4nP~827zVG+{ z-}Bsi14$-(W_D+1&(4`0iBeUT#Y7`UgMop;l$VoIhk=1jgTj+2NYKyo1eI`TgM_W5 zq^i86B&DjWvz4ubB@7HhqPd9)t{gMNu&Jqu$?yadBbuwHdSqmbx=G;R&tA&GpJ0>T z{IqlfgH1y0O?b^-m?E{FR(p&X%KHYua22i=`8yrmJ%WW}1-y!#I6l(~Sy%(c@_`Yt z`#0F7?+M~WLpeL}XBe=ay5Qgtpj;LGwvLugv4O^F)Kxs|+fR@0L zke!$gXCVsP;GUGwKbyFu>f7UV`dR1H1y!BxjB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=Vi8fE)AJ++S6kaGz&6-tnOW1HG)-1+g7v{pVga8tf5)jY%;Fdbtx z8by?djp0hdgN?6Mu2XBz{m47soyObZIla?irM7jDuUN1SiXyL$j;2a#NCLVDg2&Hj1l*YcPxB z3-1|jZsims_hHF6wWks7QLTioZ7wu;>$Tzg!+H$CIm6x(E)(j*-E*J)J;Oo_6cEt) z)?-{QG{`)AjVb+C5XnEee0bDHLtN}rA+P`UrHKUN`_0`EkJU)hOjBH1GoPG%2r(9F5B~&#XInJ%7xl#@O+R9N}0}=_9?C4yN@|O2M z5}(`1edOFXK6OjG-*?Ne1!w;L@bk)Mhaml7PX=WdP;3LPZs@~_Un-xkurWNt2>+jl s9b*#(ZUQ?uASe6R*Y1C=sh!!QbIoA#cg;gN8Lo`ln)(`_)E~Y1FD(2;#{d8T literal 0 HcmV?d00001 diff --git a/content/actions/learn-github-actions/understanding-github-actions.md b/content/actions/learn-github-actions/understanding-github-actions.md index 11c5e4dca2..e13d3d5c13 100644 --- a/content/actions/learn-github-actions/understanding-github-actions.md +++ b/content/actions/learn-github-actions/understanding-github-actions.md @@ -50,9 +50,7 @@ You can configure a {% data variables.product.prodname_actions %} _workflow_ to ### Workflows -A workflow is a configurable automated process that will run one or more jobs. Workflows are defined by a YAML file checked in to your repository and will run when triggered by an event in your repository, or they can be triggered manually, or at a defined schedule. - -You can have multiple workflows in a repository, each of which can perform a different set of steps. For example, you can have one workflow to build and test pull requests, another workflow to deploy your application every time a release is created, and still another workflow that adds a label every time someone opens a new issue. +{% data reusables.actions.about-workflows-long %} {% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}You can reference a workflow within another workflow, see "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)."{% endif %} @@ -86,173 +84,7 @@ For more information, see "[Creating actions](/actions/creating-actions)." {% data reusables.actions.about-runners %} Each runner can run a single job at a time. {% ifversion ghes or ghae %} You must host your own runners for {% data variables.product.product_name %}. {% elsif fpt or ghec %}{% data variables.product.company_short %} provides Ubuntu Linux, Microsoft Windows, and macOS runners to run your workflows; each workflow run executes in a fresh, newly-provisioned virtual machine. If you need a different operating system or require a specific hardware configuration, you can host your own runners.{% endif %} For more information{% ifversion fpt or ghec %} about self-hosted runners{% endif %}, see "[Hosting your own runners](/actions/hosting-your-own-runners)." -## Create an example workflow - -{% data variables.product.prodname_actions %} uses YAML syntax to define the workflow. Each workflow is stored as a separate YAML file in your code repository, in a directory called `.github/workflows`. - -You can create an example workflow in your repository that automatically triggers a series of commands whenever code is pushed. In this workflow, {% data variables.product.prodname_actions %} checks out the pushed code, installs the software dependencies, and runs `bats -v`. - -1. In your repository, create the `.github/workflows/` directory to store your workflow files. -1. In the `.github/workflows/` directory, create a new file called `learn-github-actions.yml` and add the following code. - - ```yaml - name: learn-github-actions - on: [push] - jobs: - check-bats-version: - runs-on: ubuntu-latest - steps: - - uses: {% data reusables.actions.action-checkout %} - - uses: {% data reusables.actions.action-setup-node %} - with: - node-version: '14' - - run: npm install -g bats - - run: bats -v - ``` -1. Commit these changes and push them to your {% data variables.product.prodname_dotcom %} repository. - -Your new {% data variables.product.prodname_actions %} workflow file is now installed in your repository and will run automatically each time someone pushes a change to the repository. For details about a workflow's execution history, see "[Viewing the workflow's activity](/actions/learn-github-actions/introduction-to-github-actions#viewing-the-workflows-activity)." - -## Understanding the workflow file - -To help you understand how YAML syntax is used to create a workflow file, this section explains each line of the introduction's example: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ```yaml - name: learn-github-actions - ``` - - Optional - The name of the workflow as it will appear in the Actions tab of the {% data variables.product.prodname_dotcom %} repository. -
- - ```yaml - on: [push] - ``` - -Specifies the trigger for this workflow. This example uses the push event, so a workflow run is triggered every time someone pushes a change to the repository or merges a pull request. This is triggered by a push to every branch; for examples of syntax that runs only on pushes to specific branches, paths, or tags, see "Workflow syntax for {% data variables.product.prodname_actions %}." -
- - ```yaml - jobs: - ``` - - Groups together all the jobs that run in the learn-github-actions workflow. -
- - ```yaml - check-bats-version: - ``` - -Defines a job named check-bats-version. The child keys will define properties of the job. -
- - ```yaml - runs-on: ubuntu-latest - ``` - - Configures the job to run on the latest version of an Ubuntu Linux runner. This means that the job will execute on a fresh virtual machine hosted by GitHub. For syntax examples using other runners, see "Workflow syntax for {% data variables.product.prodname_actions %}." -
- - ```yaml - steps: - ``` - - Groups together all the steps that run in the check-bats-version job. Each item nested under this section is a separate action or shell script. -
- - ```yaml - - uses: {% data reusables.actions.action-checkout %} - ``` - -The uses keyword specifies that this step will run v3 of the actions/checkout action. This is an action that checks out your repository onto the runner, allowing you to run scripts or other actions against your code (such as build and test tools). You should use the checkout action any time your workflow will run against the repository's code. -
- - ```yaml - - uses: {% data reusables.actions.action-setup-node %} - with: - node-version: '14' - ``` - - This step uses the {% data reusables.actions.action-setup-node %} action to install the specified version of the Node.js (this example uses v14). This puts both the node and npm commands in your PATH. -
- - ```yaml - - run: npm install -g bats - ``` - - The run keyword tells the job to execute a command on the runner. In this case, you are using npm to install the bats software testing package. -
- - ```yaml - - run: bats -v - ``` - - Finally, you'll run the bats command with a parameter that outputs the software version. -
- -### Visualizing the workflow file - -In this diagram, you can see the workflow file you just created and how the {% data variables.product.prodname_actions %} components are organized in a hierarchy. Each step executes a single action or shell script. Steps 1 and 2 run actions, while steps 3 and 4 run shell scripts. To find more prebuilt actions for your workflows, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)." - -![Workflow overview](/assets/images/help/images/overview-actions-event.png) - -## Viewing the workflow's activity - -Once your workflow has started running, you can see a visualization graph of the run's progress and view each step's activity on {% data variables.product.prodname_dotcom %}. - -{% data reusables.repositories.navigate-to-repo %} -1. Under your repository name, click **Actions**. - ![Navigate to repository](/assets/images/help/images/learn-github-actions-repository.png) -1. In the left sidebar, click the workflow you want to see. - ![Screenshot of workflow results](/assets/images/help/images/learn-github-actions-workflow.png) -1. Under "Workflow runs", click the name of the run you want to see. - ![Screenshot of workflow runs](/assets/images/help/images/learn-github-actions-run.png) -1. Under **Jobs** or in the visualization graph, click the job you want to see. - ![Select job](/assets/images/help/images/overview-actions-result-navigate.png) -1. View the results of each step. - ![Screenshot of workflow run details](/assets/images/help/images/overview-actions-result-updated-2.png) +{% data reusables.actions.workflow-basic-example-and-explanation %} ## Next steps @@ -268,7 +100,8 @@ To understand how billing works for {% data variables.product.prodname_actions % {% data reusables.actions.contacting-support %} +{% ifversion ghec or ghes or ghae %} ## Further reading -{% ifversion ghec or ghes or ghae %} -- "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)"{% endif %} +- "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)" +{% endif %} diff --git a/content/actions/using-workflows/advanced-workflow-features.md b/content/actions/using-workflows/about-workflows.md similarity index 51% rename from content/actions/using-workflows/advanced-workflow-features.md rename to content/actions/using-workflows/about-workflows.md index b954cc280b..502c455aca 100644 --- a/content/actions/using-workflows/advanced-workflow-features.md +++ b/content/actions/using-workflows/about-workflows.md @@ -1,32 +1,67 @@ --- -title: Advanced workflow features -shortTitle: Advanced workflow features -intro: 'This guide shows you how to use the advanced features of {% data variables.product.prodname_actions %}, with secret management, dependent jobs, caching, build matrices, environments, and labels.' -redirect_from: - - /actions/learn-github-actions/managing-complex-workflows +title: About workflows +shortTitle: About workflows +intro: 'Get a high level overview {% data variables.product.prodname_actions %} workflows, including triggers, syntax, and advanced features.' versions: fpt: '*' ghes: '*' ghae: '*' ghec: '*' -type: how_to +type: overview +redirect_from: + - /actions/learn-github-actions/managing-complex-workflows + - /actions/using-workflows/advanced-workflow-features topics: - Workflows -miniTocMaxHeadingLevel: 4 +miniTocMaxHeadingLevel: 3 --- -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## About workflows -## Overview +{% data reusables.actions.about-workflows-long %} -This article describes some of the advanced features of {% data variables.product.prodname_actions %} that help you create more complex workflows. +## Workflow basics -## Storing secrets +A workflow must contain the following basic components: -If your workflows use sensitive data, such as passwords or certificates, you can save these in {% data variables.product.prodname_dotcom %} as _secrets_ and then use them in your workflows as environment variables. This means that you will be able to create and share workflows without having to embed sensitive values directly in the YAML workflow. +1. One or more _events_ that will trigger the workflow. +1. One or more _jobs_, each of which will execute on a _runner_ machine and run a series of one or more _steps_. +1. Each step can either run a script that you define or run an action, which is a reusable extension that can simplify your workflow. -This example action demonstrates how to reference an existing secret as an environment variable, and send it as a parameter to an example command. +For more information these basic components, see "[Understanding GitHub Actions](/actions/learn-github-actions/understanding-github-actions#the-components-of-github-actions)." + +![Workflow overview](/assets/images/help/images/overview-actions-simple.png) + +## Triggering a workflow + +{% data reusables.actions.about-triggers %} + +For more information, see "[Triggering a workflow](/actions/using-workflows/triggering-a-workflow)", and for a full list of events, see "[Events that trigger workflows](/actions/using-workflows/events-that-trigger-workflows)." + +## Workflow syntax + +Workflow are defined using YAML. For the full reference of the YAML syntax for authoring workflows, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows)." + + +{% data reusables.actions.workflow-basic-example-and-explanation %} + +For more on managing workflow runs, such as re-running, cancelling, or deleting a workflow run, see "[Managing workflow runs](/actions/managing-workflow-runs)." + +## Using starter workflows + +{% data reusables.actions.workflow-template-overview %} + +For more information on using and creating starter workflows, see "[Using starter workflows](/actions/using-workflows/using-starter-workflows)" and "[Creating starter workflows for your organization](/actions/using-workflows/creating-starter-workflows-for-your-organization)." + +## Advanced workflow features + +This section briefly describes some of the advanced features of {% data variables.product.prodname_actions %} that help you create more complex workflows. + +### Storing secrets + +If your workflows use sensitive data, such as passwords or certificates, you can save these in {% data variables.product.prodname_dotcom %} as _secrets_ and then use them in your workflows as environment variables. This means that you will be able to create and share workflows without having to embed sensitive values directly in the workflow's YAML source. + +This example job demonstrates how to reference an existing secret as an environment variable, and send it as a parameter to an example command. {% raw %} ```yaml @@ -42,11 +77,11 @@ jobs: ``` {% endraw %} -For more information, see "[Creating and storing encrypted secrets](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)." +For more information, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)." -## Creating dependent jobs +### Creating dependent jobs -By default, the jobs in your workflow all run in parallel at the same time. So if you have a job that must only run after another job has completed, you can use the `needs` keyword to create this dependency. If one of the jobs fails, all dependent jobs are skipped; however, if you need the jobs to continue, you can define this using the [`if`](/actions/using-jobs/using-conditions-to-control-job-execution) conditional statement. +By default, the jobs in your workflow all run in parallel at the same time. If you have a job that must only run after another job has completed, you can use the `needs` keyword to create this dependency. If one of the jobs fails, all dependent jobs are skipped; however, if you need the jobs to continue, you can define this using the `if` conditional statement. In this example, the `setup`, `build`, and `test` jobs run in series, with `build` and `test` being dependent on the successful completion of the job that precedes them: @@ -70,9 +105,9 @@ jobs: For more information, see "[Defining prerequisite jobs](/actions/using-jobs/using-jobs-in-a-workflow#defining-prerequisite-jobs)." -## Using a build matrix +### Using a build matrix -You can use a build matrix if you want your workflow to run tests across multiple combinations of operating systems, platforms, and languages. The build matrix is created using the `strategy` keyword, which receives the build options as an array. For example, this build matrix will run the job multiple times, using different versions of Node.js: +You can use a build matrix if you want your workflow to run tests across multiple combinations of parameters, such as operating systems, platforms, and languages. The build matrix is created using the `strategy` keyword, which receives the build options as an array. For example, this build matrix will run the job multiple times, using different versions of Node.js: ```yaml jobs: @@ -90,7 +125,7 @@ jobs: For more information, see "[Using a build matrix for your jobs](/actions/using-jobs/using-a-build-matrix-for-your-jobs)." {% ifversion fpt or ghec %} -## Caching dependencies +### Caching dependencies {% data variables.product.prodname_dotcom %}-hosted runners are started as fresh environments for each job, so if your jobs regularly reuse dependencies, you can consider caching these files to help improve performance. Once the cache is created, it is available to all workflows in the same repository. @@ -111,10 +146,10 @@ jobs: {% raw %}${{ runner.os }}-build-${{ env.cache-name }}-{% endraw %} ``` -For more information, see "Caching dependencies to speed up workflows." +For more information, see "[Caching dependencies to speed up workflows](/actions/using-workflows/caching-dependencies-to-speed-up-workflows)." {% endif %} -## Using databases and service containers +### Using databases and service containers If your job requires a database or cache service, you can use the [`services`](/actions/using-jobs/running-jobs-in-a-container) keyword to create an ephemeral container to host the service; the resulting container is then available to all steps in that job and is removed when the job has completed. This example demonstrates how a job can use `services` to create a `postgres` container, and then use `node` to connect to the service. @@ -138,11 +173,11 @@ jobs: POSTGRES_PORT: 5432 ``` -For more information, see "[Using databases and service containers](/actions/configuring-and-managing-workflows/using-databases-and-service-containers)." +For more information, see "[Using containerized services](/actions/using-containerized-services)." -## Using labels to route workflows +### Using labels to route workflows -This feature helps you assign jobs to a specific hosted runner. If you want to be sure that a particular type of runner will process your job, you can use labels to control where jobs are executed. You can assign labels to a self-hosted runner in addition to their default label of `self-hosted`. Then, you can refer to these labels in your YAML workflow, ensuring that the job is routed in a predictable way.{% ifversion not ghae %} {% data variables.product.prodname_dotcom %}-hosted runners have predefined labels assigned.{% endif %} +If you want to be sure that a particular type of runner will process your job, you can use labels to control where jobs are executed. You can assign labels to a self-hosted runner in addition to their default label of `self-hosted`. Then, you can refer to these labels in your YAML workflow, ensuring that the job is routed in a predictable way.{% ifversion not ghae %} {% data variables.product.prodname_dotcom %}-hosted runners have predefined labels assigned.{% endif %} This example shows how a workflow can use labels to specify the required runner: @@ -152,34 +187,19 @@ jobs: runs-on: [self-hosted, linux, x64, gpu] ``` -A workflow will only run on a runner that has all the labels in the `runs-on` array. The job will preferentially go to an idle self-hosted runner with the specified labels. If none are available and a {% data variables.product.prodname_dotcom %}-hosted runner with the specified labels exists, the job will go to a {% data variables.product.prodname_dotcom %}-hosted runner. +A workflow will only run on a runner that has all the labels in the `runs-on` array. The job will preferentially go to an idle self-hosted runner with the specified labels. {% ifversion fpt or ghec %}If none are available and a {% data variables.product.prodname_dotcom %}-hosted runner with the specified labels exists, the job will go to a {% data variables.product.prodname_dotcom %}-hosted runner.{% endif %} -To learn more about self-hosted runner labels, see ["Using labels with self-hosted runners](/actions/hosting-your-own-runners/using-labels-with-self-hosted-runners)." +To learn more about self-hosted runner labels, see "[Using labels with self-hosted runners](/actions/hosting-your-own-runners/using-labels-with-self-hosted-runners)." -{% ifversion fpt or ghes %} -To learn more about {% data variables.product.prodname_dotcom %}-hosted runner labels, see ["Supported runners and hardware resources"](/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources). +{% ifversion fpt or ghec %} +To learn more about {% data variables.product.prodname_dotcom %}-hosted runner labels, see "[Supported runners and hardware resources](/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources)." {% endif %} {% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} -## Reusing workflows +### Reusing workflows {% data reusables.actions.reusable-workflows %} {% endif %} -## Using environments +### Using environments -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 "[Using environments for deployment](/actions/deployment/using-environments-for-deployment)." - -## Using starter workflows - -{% 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 starter workflow 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, secrets, and runners with your organization](/actions/learn-github-actions/sharing-workflows-secrets-and-runners-with-your-organization)." +You can configure environments with protection rules and secrets to control the execution of jobs in a workflow. 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 "[Using environments for deployment](/actions/deployment/using-environments-for-deployment)." diff --git a/content/actions/using-workflows/index.md b/content/actions/using-workflows/index.md index 1651e2b7b3..b94c06be00 100644 --- a/content/actions/using-workflows/index.md +++ b/content/actions/using-workflows/index.md @@ -21,12 +21,12 @@ versions: ghae: '*' ghec: '*' children: + - /about-workflows - /triggering-a-workflow - /events-that-trigger-workflows - /workflow-syntax-for-github-actions - /workflow-commands-for-github-actions - /reusing-workflows - - /advanced-workflow-features - /creating-starter-workflows-for-your-organization - /using-starter-workflows - /sharing-workflows-secrets-and-runners-with-your-organization diff --git a/content/actions/using-workflows/triggering-a-workflow.md b/content/actions/using-workflows/triggering-a-workflow.md index 95f9b22e27..f14a271a77 100644 --- a/content/actions/using-workflows/triggering-a-workflow.md +++ b/content/actions/using-workflows/triggering-a-workflow.md @@ -20,14 +20,7 @@ miniTocMaxHeadingLevel: 3 ## About workflow triggers -Workflow triggers are events that cause a workflow to run. These events can be: - -- Events that occur in your workflow's repository -- Events that occur outside of {% data variables.product.product_name %} and trigger a `repository_dispatch` event on {% data variables.product.product_name %} -- Scheduled times -- Manual - -For example, you can configure your workflow to run when a push is made to the default branch of your repository, when a release is created, or when an issue is opened. +{% data reusables.actions.about-triggers %} Workflow triggers are defined with the `on` key. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/articles/workflow-syntax-for-github-actions#on)." diff --git a/content/actions/using-workflows/using-starter-workflows.md b/content/actions/using-workflows/using-starter-workflows.md index b1dd8b56a0..1bfdbe5bf3 100644 --- a/content/actions/using-workflows/using-starter-workflows.md +++ b/content/actions/using-workflows/using-starter-workflows.md @@ -39,8 +39,10 @@ Anyone with write permission to a repository can set up {% data variables.produc {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.actions-tab %} 1. If you already have a workflow in your repository, click **New workflow**. -1. Find the starter workflow that you want to use, then click **Set up this workflow**.{% if actions-starter-template-ui %} To help you find the starter workflow that you want, you can search for keywords or filter by category.{% endif %} -1. If the starter workflow contains comments detailing additional setup steps, follow these steps. Many of the starter workflow have corresponding guides. For more information, see [the {% data variables.product.prodname_actions %} guides](/actions/guides)." +1. The "{% if actions-starter-template-ui %}Choose a workflow{% else %}Choose a workflow template{% endif %}" page shows a selection of recommended starter workflows. Find the starter workflow that you want to use, then click {% if actions-starter-template-ui %}**Configure**{% else %}**Set up this workflow**{% endif %}.{% if actions-starter-template-ui %} To help you find the starter workflow that you want, you can search for keywords or filter by category.{% endif %} + + {% if actions-starter-template-ui %}![Configure this workflow](/assets/images/help/settings/actions-create-starter-workflow-updated-ui.png){% else %}![Set up this workflow](/assets/images/help/settings/actions-create-starter-workflow.png){% endif %} +1. If the starter workflow contains comments detailing additional setup steps, follow these steps. Many of the starter workflow have corresponding guides. For more information, see the [{% data variables.product.prodname_actions %} guides](/actions/guides). 1. Some starter workflows use secrets. For example, {% raw %}`${{ secrets.npm_token }}`{% endraw %}. If the starter workflow uses a secret, store the value described in the secret name as a secret in your repository. For more information, see "[Encrypted secrets](/actions/reference/encrypted-secrets)." 1. Optionally, make additional changes. For example, you might want to change the value of `on` to change when the workflow runs. 1. Click **Start commit**. diff --git a/data/features/actions-starter-template-ui.yml b/data/features/actions-starter-template-ui.yml index da4faf291a..37e13246f1 100644 --- a/data/features/actions-starter-template-ui.yml +++ b/data/features/actions-starter-template-ui.yml @@ -3,3 +3,5 @@ versions: fpt: '*' ghec: '*' + ghes: '>3.4' + ghae: 'issue-5169' diff --git a/data/reusables/actions/about-triggers.md b/data/reusables/actions/about-triggers.md new file mode 100644 index 0000000000..f5b729bb61 --- /dev/null +++ b/data/reusables/actions/about-triggers.md @@ -0,0 +1,8 @@ +Workflow triggers are events that cause a workflow to run. These events can be: + +- Events that occur in your workflow's repository +- Events that occur outside of {% data variables.product.product_name %} and trigger a `repository_dispatch` event on {% data variables.product.product_name %} +- Scheduled times +- Manual + +For example, you can configure your workflow to run when a push is made to the default branch of your repository, when a release is created, or when an issue is opened. diff --git a/data/reusables/actions/about-workflows-long.md b/data/reusables/actions/about-workflows-long.md new file mode 100644 index 0000000000..7806446b79 --- /dev/null +++ b/data/reusables/actions/about-workflows-long.md @@ -0,0 +1,3 @@ +A workflow is a configurable automated process that will run one or more jobs. Workflows are defined by a YAML file checked in to your repository and will run when triggered by an event in your repository, or they can be triggered manually, or at a defined schedule. + +Workflows are defined in the `.github/workflows` directory in a repository, and a repository can have multiple workflows, each of which can perform a different set of tasks. For example, you can have one workflow to build and test pull requests, another workflow to deploy your application every time a release is created, and still another workflow that adds a label every time someone opens a new issue. diff --git a/data/reusables/actions/workflow-basic-example-and-explanation.md b/data/reusables/actions/workflow-basic-example-and-explanation.md new file mode 100644 index 0000000000..964b6b72b7 --- /dev/null +++ b/data/reusables/actions/workflow-basic-example-and-explanation.md @@ -0,0 +1,172 @@ +## Create an example workflow + +{% data variables.product.prodname_actions %} uses YAML syntax to define the workflow. Each workflow is stored as a separate YAML file in your code repository, in a directory named `.github/workflows`. + +You can create an example workflow in your repository that automatically triggers a series of commands whenever code is pushed. In this workflow, {% data variables.product.prodname_actions %} checks out the pushed code, installs the [bats](https://www.npmjs.com/package/bats) testing framework, and runs a basic command to output the bats version: `bats -v`. + +1. In your repository, create the `.github/workflows/` directory to store your workflow files. +1. In the `.github/workflows/` directory, create a new file called `learn-github-actions.yml` and add the following code. + + ```yaml + name: learn-github-actions + on: [push] + jobs: + check-bats-version: + runs-on: ubuntu-latest + steps: + - uses: {% data reusables.actions.action-checkout %} + - uses: {% data reusables.actions.action-setup-node %} + with: + node-version: '14' + - run: npm install -g bats + - run: bats -v + ``` +1. Commit these changes and push them to your {% data variables.product.prodname_dotcom %} repository. + +Your new {% data variables.product.prodname_actions %} workflow file is now installed in your repository and will run automatically each time someone pushes a change to the repository. To see the details about a workflow's execution history, see "[Viewing the activity for a workflow run](#viewing-the-activity-for-a-workflow-run)." + +## Understanding the workflow file + +To help you understand how YAML syntax is used to create a workflow file, this section explains each line of the introduction's example: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + ```yaml + name: learn-github-actions + ``` + + Optional - The name of the workflow as it will appear in the Actions tab of the {% data variables.product.prodname_dotcom %} repository. +
+ + ```yaml + on: [push] + ``` + +Specifies the trigger for this workflow. This example uses the push event, so a workflow run is triggered every time someone pushes a change to the repository or merges a pull request. This is triggered by a push to every branch; for examples of syntax that runs only on pushes to specific branches, paths, or tags, see "Workflow syntax for {% data variables.product.prodname_actions %}." +
+ + ```yaml + jobs: + ``` + + Groups together all the jobs that run in the learn-github-actions workflow. +
+ + ```yaml + check-bats-version: + ``` + +Defines a job named check-bats-version. The child keys will define properties of the job. +
+ + ```yaml + runs-on: ubuntu-latest + ``` + + Configures the job to run on the latest version of an Ubuntu Linux runner. This means that the job will execute on a fresh virtual machine hosted by GitHub. For syntax examples using other runners, see "Workflow syntax for {% data variables.product.prodname_actions %}." +
+ + ```yaml + steps: + ``` + + Groups together all the steps that run in the check-bats-version job. Each item nested under this section is a separate action or shell script. +
+ + ```yaml + - uses: {% data reusables.actions.action-checkout %} + ``` + +The uses keyword specifies that this step will run v3 of the actions/checkout action. This is an action that checks out your repository onto the runner, allowing you to run scripts or other actions against your code (such as build and test tools). You should use the checkout action any time your workflow will run against the repository's code. +
+ + ```yaml + - uses: {% data reusables.actions.action-setup-node %} + with: + node-version: '14' + ``` + + This step uses the {% data reusables.actions.action-setup-node %} action to install the specified version of the Node.js (this example uses v14). This puts both the node and npm commands in your PATH. +
+ + ```yaml + - run: npm install -g bats + ``` + + The run keyword tells the job to execute a command on the runner. In this case, you are using npm to install the bats software testing package. +
+ + ```yaml + - run: bats -v + ``` + + Finally, you'll run the bats command with a parameter that outputs the software version. +
+ +### Visualizing the workflow file + +In this diagram, you can see the workflow file you just created and how the {% data variables.product.prodname_actions %} components are organized in a hierarchy. Each step executes a single action or shell script. Steps 1 and 2 run actions, while steps 3 and 4 run shell scripts. To find more prebuilt actions for your workflows, see "[Finding and customizing actions](/actions/learn-github-actions/finding-and-customizing-actions)." + +![Workflow overview](/assets/images/help/images/overview-actions-event.png) + +## Viewing the activity for a workflow run + +When your workflow is triggered, a _workflow run_ is created that executes the workflow. After a workflow run has started, you can see a visualization graph of the run's progress and view each step's activity on {% data variables.product.prodname_dotcom %}. + +{% data reusables.repositories.navigate-to-repo %} +1. Under your repository name, click **Actions**. + + ![Navigate to repository](/assets/images/help/images/learn-github-actions-repository.png) +1. In the left sidebar, click the workflow you want to see. + + ![Screenshot of workflow results](/assets/images/help/images/learn-github-actions-workflow.png) +1. Under "Workflow runs", click the name of the run you want to see. + + ![Screenshot of workflow runs](/assets/images/help/images/learn-github-actions-run.png) +1. Under **Jobs** or in the visualization graph, click the job you want to see. + + ![Select job](/assets/images/help/images/overview-actions-result-navigate.png) +1. View the results of each step. + + ![Screenshot of workflow run details](/assets/images/help/images/overview-actions-result-updated-2.png) \ No newline at end of file