Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note major versions are not automatically tagged #17776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Note major versions are not automatically tagged #17776
Changes from all commits
7d66b767194d4aa61d9275966392dd22a98366355eb3180e6File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
About YAML syntax for workflows
Workflow files use YAML syntax, and must have either a
.ymlor.yamlfile extension. {% data reusables.actions.learn-more-about-yaml %}You must store workflow files in the
.github/workflowsdirectory of your repository.nameThe name of your workflow. {% data variables.product.prodname_dotcom %} displays the names of your workflows on your repository's actions page. If you omit
name, {% data variables.product.prodname_dotcom %} sets it to the workflow file path relative to the root of the repository.on{% data reusables.actions.workflows.section-triggering-a-workflow %}
on.<event_name>.types{% data reusables.actions.workflows.section-triggering-a-workflow-types %}
on.<pull_request|pull_request_target>.<branches|branches-ignore>{% data reusables.actions.workflows.section-triggering-a-workflow-branches %}
on.push.<branches|tags|branches-ignore|tags-ignore>{% data reusables.actions.workflows.section-run-on-specific-branches-or-tags %}
on.<push|pull_request|pull_request_target>.<paths|paths-ignore>{% data reusables.actions.workflows.section-triggering-a-workflow-paths %}
on.schedule{% data reusables.actions.workflows.section-triggering-a-workflow-schedule %}
{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}
on.workflow_call{% data reusables.actions.reusable-workflows-ghes-beta %}
Use
on.workflow_callto define the inputs and outputs for a reusable workflow. You can also map the secrets that are available to the called workflow. For more information on reusable workflows, see "Reusing workflows."on.workflow_call.inputsWhen using the
workflow_callkeyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow. For more information about theworkflow_callkeyword, see "Events that trigger workflows."In addition to the standard input parameters that are available,
on.workflow_call.inputsrequires atypeparameter. For more information, seeon.workflow_call.inputs.<input_id>.type.If a
defaultparameter is not set, the default value of the input isfalsefor a boolean,0for a number, and""for a string.Within the called workflow, you can use the
inputscontext to refer to an input.If a caller workflow passes an input that is not specified in the called workflow, this results in an error.
Example
{% raw %}
{% endraw %}
For more information, see "Reusing workflows."
on.workflow_call.inputs.<input_id>.typeRequired if input is defined for the
on.workflow_callkeyword. The value of this parameter is a string specifying the data type of the input. This must be one of:boolean,number, orstring.on.workflow_call.outputsA map of outputs for a called workflow. Called workflow outputs are available to all downstream jobs in the caller workflow. Each output has an identifier, an optional
description,and avalue.Thevaluemust be set to the value of an output from a job within the called workflow.In the example below, two outputs are defined for this reusable workflow:
workflow_output1andworkflow_output2. These are mapped to outputs calledjob_output1andjob_output2, both from a job calledmy_job.Example
{% raw %}
{% endraw %}
For information on how to reference a job output, see
jobs.<job_id>.outputs. For more information, see "Reusing workflows."on.workflow_call.secretsA map of the secrets that can be used in the called workflow.
Within the called workflow, you can use the
secretscontext to refer to a secret.If a caller workflow passes a secret that is not specified in the called workflow, this results in an error.
Example
{% raw %}
{% endraw %}
on.workflow_call.secrets.<secret_id>A string identifier to associate with the secret.
on.workflow_call.secrets.<secret_id>.requiredA boolean specifying whether the secret must be supplied. {% endif %}
on.workflow_run.<branches|branches-ignore>{% data reusables.actions.workflows.section-specifying-branches %}
on.workflow_dispatch.inputs{% data reusables.actions.workflow-dispatch-inputs %}
permissions{% data reusables.actions.jobs.section-assigning-permissions-to-jobs %}
envA
mapof environment variables that are available to the steps of all jobs in the workflow. You can also set environment variables that are only available to the steps of a single job or to a single step. For more information, seejobs.<job_id>.envandjobs.<job_id>.steps[*].env.Variables in the
envmap cannot be defined in terms of other variables in the map.{% data reusables.repositories.actions-env-var-note %}
Example
defaults{% data reusables.actions.jobs.setting-default-values-for-jobs-defaults %}
defaults.run{% data reusables.actions.jobs.setting-default-values-for-jobs-defaults-run %}
concurrency{% data reusables.actions.jobs.section-using-concurrency %}
jobs{% data reusables.actions.jobs.section-using-jobs-in-a-workflow %}
jobs.<job_id>{% data reusables.actions.jobs.section-using-jobs-in-a-workflow-id %}
jobs.<job_id>.name{% data reusables.actions.jobs.section-using-jobs-in-a-workflow-name %}
jobs.<job_id>.permissions{% data reusables.actions.jobs.section-assigning-permissions-to-jobs-specific %}
jobs.<job_id>.needs{% data reusables.actions.jobs.section-using-jobs-in-a-workflow-needs %}
jobs.<job_id>.if{% data reusables.actions.jobs.section-using-conditions-to-control-job-execution %}
jobs.<job_id>.runs-on{% data reusables.actions.jobs.section-choosing-the-runner-for-a-job %}
jobs.<job_id>.environment{% data reusables.actions.jobs.section-using-environments-for-jobs %}
jobs.<job_id>.concurrency{% data reusables.actions.jobs.section-using-concurrency-jobs %}
jobs.<job_id>.outputs{% data reusables.actions.jobs.section-defining-outputs-for-jobs %}
jobs.<job_id>.envA
mapof environment variables that are available to all steps in the job. You can also set environment variables for the entire workflow or an individual step. For more information, seeenvandjobs.<job_id>.steps[*].env.{% data reusables.repositories.actions-env-var-note %}
Example
jobs.<job_id>.defaults{% data reusables.actions.jobs.setting-default-values-for-jobs-defaults-job %}
jobs.<job_id>.defaults.run{% data reusables.actions.jobs.setting-default-values-for-jobs-defaults-job-run %}
jobs.<job_id>.stepsA job contains a sequence of tasks called
steps. Steps can run commands, run setup tasks, or run an action in your repository, a public repository, or an action published in a Docker registry. Not all steps run actions, but all actions run as a step. Each step runs in its own process in the runner environment and has access to the workspace and filesystem. Because steps run in their own process, changes to environment variables are not preserved between steps. {% data variables.product.prodname_dotcom %} provides built-in steps to set up and complete a job.You can run an unlimited number of steps as long as you are within the workflow usage limits. For more information, see {% ifversion fpt or ghec or ghes %}"Usage limits and billing" for {% data variables.product.prodname_dotcom %}-hosted runners and {% endif %}"About self-hosted runners{% ifversion fpt or ghec or ghes %}" for self-hosted runner usage limits.{% elsif ghae %}."{% endif %}
Example
{% raw %}
{% endraw %}
jobs.<job_id>.steps[*].idA unique identifier for the step. You can use the
idto reference the step in contexts. For more information, see "Contexts."jobs.<job_id>.steps[*].ifYou can use the
ifconditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.{% data reusables.actions.expression-syntax-if %} For more information, see "Expressions."
Example: Using contexts
This step only runs when the event type is a
pull_requestand the event action isunassigned.Example: Using status check functions
The
my backup steponly runs when the previous step of a job fails. For more information, see "Expressions."Example: Using secrets
Secrets cannot be directly referenced in
if:conditionals. Instead, consider setting secrets as job-level environment variables, then referencing the environment variables to conditionally run steps in the job.If a secret has not been set, the return value of an expression referencing the secret (such as {% raw %}
${{ secrets.SuperSecret }}{% endraw %} in the example) will be an empty string.{% raw %}
{% endraw %}
For more information, see "Context availability" and "Encrypted secrets."
jobs.<job_id>.steps[*].nameA name for your step to display on {% data variables.product.prodname_dotcom %}.
jobs.<job_id>.steps[*].usesSelects an action to run as part of a step in your job. An action is a reusable unit of code. You can use an action defined in the same repository as the workflow, a public repository, or in a published Docker container image.
We strongly recommend that you include the version of the action you are using by specifying a Git ref, SHA, or Docker
tag numbertag. If you don't specify a version, it could break your workflows or cause unexpected behavior when the action owner publishes an update.Some actions require inputs that you must set using the
withkeyword. Review the action's README file to determine the inputs required.Actions are either JavaScript files or Docker containers. If the action you're using is a Docker container you must run the job in a Linux environment. For more details, see
runs-on.Example: Using versioned actions
Example: Using a public action
{owner}/{repo}@{ref}You can specify a branch, ref, or SHA in a public {% data variables.product.prodname_dotcom %} repository.
Example: Using a public action in a subdirectory
{owner}/{repo}/{path}@{ref}A subdirectory in a public {% data variables.product.prodname_dotcom %} repository at a specific branch, ref, or SHA.
Example: Using an action in the same repository as the workflow
./path/to/dirThe path to the directory that contains the action in your workflow's repository. You must check out your repository before using the action.
Example: Using a Docker Hub action
docker://{image}:{tag}A Docker image published on Docker Hub.
{% ifversion fpt or ghec %}
Example: Using the {% data variables.product.prodname_registry %} {% data variables.product.prodname_container_registry %}
docker://{host}/{image}:{tag}A Docker image in the {% data variables.product.prodname_registry %} {% data variables.product.prodname_container_registry %}.
{% endif %}
Example: Using a Docker public registry action
docker://{host}/{image}:{tag}A Docker image in a public registry. This example uses the Google Container Registry at
gcr.io.Example: Using an action inside a different private repository than the workflow
Your workflow must checkout the private repository and reference the action locally. Generate a personal access token and add the token as an encrypted secret. For more information, see "Creating a personal access token" and "Encrypted secrets."
Replace
PERSONAL_ACCESS_TOKENin the example with the name of your secret.jobs.<job_id>.steps[*].runRuns command-line programs using the operating system's shell. If you do not provide a
name, the step name will default to the text specified in theruncommand.Commands run using non-login shells by default. You can choose a different shell and customize the shell used to run commands. For more information, see
jobs.<job_id>.steps[*].shell.Each
runkeyword represents a new process and shell in the runner environment. When you provide multi-line commands, each line runs in the same shell. For example:A single-line command:
A multi-line command:
Using the
working-directorykeyword, you can specify the working directory of where to run the command.jobs.<job_id>.steps[*].shellYou can override the default shell settings in the runner's operating system using the
shellkeyword. You can use built-inshellkeywords, or you can define a custom set of shell options. The shell command that is run internally executes a temporary file that contains the commands specified in therunkeyword.shellparameterbashis specified explicitly. Ifbashis not found in the path, this is treated assh.bash -e {0}bashsh. When specifying a bash shell on Windows, the bash shell included with Git for Windows is used.bash --noprofile --norc -eo pipefail {0}pwsh.ps1to your script name.pwsh -command ". '{0}'"pythonpython {0}shbashis not found in the path.sh -e {0}cmd.cmdto your script name and substitutes for{0}.%ComSpec% /D /E:ON /V:OFF /S /C "CALL "{0}"".pwsh.ps1to your script name. If your self-hosted Windows runner does not have PowerShell Core installed, then PowerShell Desktop is used instead.pwsh -command ". '{0}'".powershell.ps1to your script name.powershell -command ". '{0}'".Example: Running a script using bash
Example: Running a script using Windows
cmdExample: Running a script using PowerShell Core
Example: Using PowerShell Desktop to run a script
Example: Running a python script
Custom shell
You can set the
shellvalue to a template string usingcommand […options] {0} [..more_options]. {% data variables.product.prodname_dotcom %} interprets the first whitespace-delimited word of the string as the command, and inserts the file name for the temporary script at{0}.For example:
The command used,
perlin this example, must be installed on the runner.{% ifversion ghae %} {% data reusables.actions.self-hosted-runners-software %} {% elsif fpt or ghec %} For information about the software included on GitHub-hosted runners, see "Specifications for GitHub-hosted runners." {% endif %}
Exit codes and error action preference
For built-in shell keywords, we provide the following defaults that are executed by {% data variables.product.prodname_dotcom %}-hosted runners. You should use these guidelines when running shell scripts.
bash/sh:set -eo pipefail: This option is set whenshell: bashis explicitly specified. It is not applied by default.bash {0}.powershell/pwshpwshandpowershellbuilt-in shell, we will prepend$ErrorActionPreference = 'stop'to script contents.if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) { exit $LASTEXITCODE }to powershell scripts so action statuses reflect the script's last exit code.pwsh -File {0}, orpowershell -Command "& '{0}'", depending on need.cmdcmd.exewill exit with the error level of the last program it executed, and it will return the error code to the runner. This behavior is internally consistent with the previousshandpwshdefault behavior and is thecmd.exedefault, so this behavior remains intact.jobs.<job_id>.steps[*].withA
mapof the input parameters defined by the action. Each input parameter is a key/value pair. Input parameters are set as environment variables. The variable is prefixed withINPUT_and converted to upper case.Example
Defines the three input parameters (
first_name,middle_name, andlast_name) defined by thehello_worldaction. These input variables will be accessible to thehello-worldaction asINPUT_FIRST_NAME,INPUT_MIDDLE_NAME, andINPUT_LAST_NAMEenvironment variables.jobs.<job_id>.steps[*].with.argsA
stringthat defines the inputs for a Docker container. {% data variables.product.prodname_dotcom %} passes theargsto the container'sENTRYPOINTwhen the container starts up. Anarray of stringsis not supported by this parameter.Example
{% raw %}
{% endraw %}
The
argsare used in place of theCMDinstruction in aDockerfile. If you useCMDin yourDockerfile, use the guidelines ordered by preference:CMDinstruction.args.--helpflag, or something similar, use that as the default to make your action self-documenting.jobs.<job_id>.steps[*].with.entrypointOverrides the Docker
ENTRYPOINTin theDockerfile, or sets it if one wasn't already specified. Unlike the DockerENTRYPOINTinstruction which has a shell and exec form,entrypointkeyword accepts only a single string defining the executable to be run.Example
The
entrypointkeyword is meant to be used with Docker container actions, but you can also use it with JavaScript actions that don't define any inputs.jobs.<job_id>.steps[*].envSets environment variables for steps to use in the runner environment. You can also set environment variables for the entire workflow or a job. For more information, see
envandjobs.<job_id>.env.{% data reusables.repositories.actions-env-var-note %}
Public actions may specify expected environment variables in the README file. If you are setting a secret in an environment variable, you must set secrets using the
secretscontext. For more information, see "Using environment variables" and "Contexts."Example
{% raw %}
{% endraw %}
jobs.<job_id>.steps[*].continue-on-errorPrevents a job from failing when a step fails. Set to
trueto allow a job to pass when this step fails.jobs.<job_id>.steps[*].timeout-minutesThe maximum number of minutes to run the step before killing the process.
jobs.<job_id>.timeout-minutesThe maximum number of minutes to let a job run before {% data variables.product.prodname_dotcom %} automatically cancels it. Default: 360
If the timeout exceeds the job execution time limit for the runner, the job will be canceled when the execution time limit is met instead. For more information about job execution time limits, see {% ifversion fpt or ghec or ghes %}"Usage limits and billing" for {% data variables.product.prodname_dotcom %}-hosted runners and {% endif %}"About self-hosted runners{% ifversion fpt or ghec or ghes %}" for self-hosted runner usage limits.{% elsif ghae %}."{% endif %}
{% note %}
Note: {% data reusables.actions.github-token-expiration %} For self-hosted runners, the token may be the limiting factor if the job timeout is greater than 24 hours. For more information on the
GITHUB_TOKEN, see "About theGITHUB_TOKENsecret."{% endnote %}
jobs.<job_id>.strategyUse
jobs.<job_id>.strategyto use a matrix strategy for your jobs. {% data reusables.actions.jobs.about-matrix-strategy %} For more information, see "Using a matrix for your jobs."jobs.<job_id>.strategy.matrix{% data reusables.actions.jobs.using-matrix-strategy %}
Example: Using a single-dimension matrix
{% data reusables.actions.jobs.single-dimension-matrix %}
Example: Using a multi-dimension matrix
{% data reusables.actions.jobs.multi-dimension-matrix %}
Example: Using contexts to create matrices
{% data reusables.actions.jobs.matrix-from-context %}
jobs.<job_id>.strategy.matrix.include{% data reusables.actions.jobs.matrix-include %}
Example: Expanding configurations
{% data reusables.actions.jobs.matrix-expand-with-include %}
Example: Adding configurations
{% data reusables.actions.jobs.matrix-add-with-include %}
jobs.<job_id>.strategy.matrix.exclude{% data reusables.actions.jobs.matrix-exclude %}
jobs.<job_id>.strategy.fail-fast{% data reusables.actions.jobs.section-using-a-build-matrix-for-your-jobs-failfast %}
jobs.<job_id>.strategy.max-parallel{% data reusables.actions.jobs.section-using-a-build-matrix-for-your-jobs-max-parallel %}
jobs.<job_id>.continue-on-errorPrevents a workflow run from failing when a job fails. Set to
trueto allow a workflow run to pass when this job fails.Example: Preventing a specific failing matrix job from failing a workflow run
You can allow specific jobs in a job matrix to fail without failing the workflow run. For example, if you wanted to only allow an experimental job with
nodeset to15to fail without failing the workflow run.{% raw %}
{% endraw %}
jobs.<job_id>.container{% data reusables.actions.docker-container-os-support %}
{% data reusables.actions.jobs.section-running-jobs-in-a-container %}
jobs.<job_id>.container.image{% data reusables.actions.jobs.section-running-jobs-in-a-container-image %}
jobs.<job_id>.container.credentials{% data reusables.actions.jobs.section-running-jobs-in-a-container-credentials %}
jobs.<job_id>.container.env{% data reusables.actions.jobs.section-running-jobs-in-a-container-env %}
jobs.<job_id>.container.ports{% data reusables.actions.jobs.section-running-jobs-in-a-container-ports %}
jobs.<job_id>.container.volumes{% data reusables.actions.jobs.section-running-jobs-in-a-container-volumes %}
jobs.<job_id>.container.options{% data reusables.actions.jobs.section-running-jobs-in-a-container-options %}
jobs.<job_id>.services{% data reusables.actions.docker-container-os-support %}
Used to host service containers for a job in a workflow. Service containers are useful for creating databases or cache services like Redis. The runner automatically creates a Docker network and manages the life cycle of the service containers.
If you configure your job to run in a container, or your step uses container actions, you don't need to map ports to access the service or action. Docker automatically exposes all ports between containers on the same Docker user-defined bridge network. You can directly reference the service container by its hostname. The hostname is automatically mapped to the label name you configure for the service in the workflow.
If you configure the job to run directly on the runner machine and your step doesn't use a container action, you must map any required Docker service container ports to the Docker host (the runner machine). You can access the service container using localhost and the mapped port.
For more information about the differences between networking service containers, see "About service containers."
Example: Using localhost
This example creates two services: nginx and redis. When you specify the Docker host port but not the container port, the container port is randomly assigned to a free port. {% data variables.product.prodname_dotcom %} sets the assigned container port in the {% raw %}
${{job.services.<service_name>.ports}}{% endraw %} context. In this example, you can access the service container ports using the {% raw %}${{ job.services.nginx.ports['8080'] }}{% endraw %} and {% raw %}${{ job.services.redis.ports['6379'] }}{% endraw %} contexts.jobs.<job_id>.services.<service_id>.imageThe Docker image to use as the service container to run the action. The value can be the Docker Hub image name or a registry name.
jobs.<job_id>.services.<service_id>.credentials{% data reusables.actions.registry-credentials %}
Example
{% raw %}
{% endraw %}
jobs.<job_id>.services.<service_id>.envSets a
mapof environment variables in the service container.jobs.<job_id>.services.<service_id>.portsSets an
arrayof ports to expose on the service container.jobs.<job_id>.services.<service_id>.volumesSets an
arrayof volumes for the service container to use. You can use volumes to share data between services or other steps in a job. You can specify named Docker volumes, anonymous Docker volumes, or bind mounts on the host.To specify a volume, you specify the source and destination path:
<source>:<destinationPath>.The
<source>is a volume name or an absolute path on the host machine, and<destinationPath>is an absolute path in the container.Example
jobs.<job_id>.services.<service_id>.optionsAdditional Docker container resource options. For a list of options, see "
docker createoptions."{% warning %}
Warning: The
--networkoption is not supported.{% endwarning %}
{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}
jobs.<job_id>.uses{% data reusables.actions.reusable-workflows-ghes-beta %}
The location and version of a reusable workflow file to run as a job. {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6000 %}Use one of the following syntaxes:{% endif %}
{% data reusables.actions.reusable-workflow-calling-syntax %}
Example
{% data reusables.actions.uses-keyword-example %}
For more information, see "Reusing workflows."
jobs.<job_id>.withWhen a job is used to call a reusable workflow, you can use
withto provide a map of inputs that are passed to the called workflow.Any inputs that you pass must match the input specifications defined in the called workflow.
Unlike
jobs.<job_id>.steps[*].with, the inputs you pass withjobs.<job_id>.withare not be available as environment variables in the called workflow. Instead, you can reference the inputs by using theinputscontext.Example
jobs.<job_id>.with.<input_id>A pair consisting of a string identifier for the input and the value of the input. The identifier must match the name of an input defined by
on.workflow_call.inputs.<inputs_id>in the called workflow. The data type of the value must match the type defined byon.workflow_call.inputs.<input_id>.typein the called workflow.Allowed expression contexts:
github, andneeds.jobs.<job_id>.secretsWhen a job is used to call a reusable workflow, you can use
secretsto provide a map of secrets that are passed to the called workflow.Any secrets that you pass must match the names defined in the called workflow.
Example
{% raw %}
{% endraw %}
{% ifversion actions-inherit-secrets-reusable-workflows %}
jobs.<job_id>.secrets.inheritUse the
inheritkeyword to pass all the calling workflow's secrets to the called workflow. This includes all secrets the calling workflow has access to, namely organization, repository, and environment secrets. Theinheritkeyword can be used to pass secrets across repositories within the same organization, or across organizations within the same enterprise.Example
{% raw %}
{% endraw %}
{%endif%}
jobs.<job_id>.secrets.<secret_id>A pair consisting of a string identifier for the secret and the value of the secret. The identifier must match the name of a secret defined by
on.workflow_call.secrets.<secret_id>in the called workflow.Allowed expression contexts:
github,needs, andsecrets. {% endif %}Filter pattern cheat sheet
You can use special characters in path, branch, and tag filters.
*: Matches zero or more characters, but does not match the/character. For example,Octo*matchesOctocat.**: Matches zero or more of any character.?: Matches zero or one of the preceding character.+: Matches one or more of the preceding character.[]Matches one character listed in the brackets or included in ranges. Ranges can only includea-z,A-Z, and0-9. For example, the range[0-9a-z]matches any digit or lowercase letter. For example,[CB]atmatchesCatorBatand[1-2]00matches100and200.!: At the start of a pattern makes it negate previous positive patterns. It has no special meaning if not the first character.The characters
*,[, and!are special characters in YAML. If you start a pattern with*,[, or!, you must enclose the pattern in quotes. Also, if you use a flow sequence with a pattern containing[and/or], the pattern must be enclosed in quotes.For more information about branch, tag, and path filter syntax, see "
on.<push>.<branches|tags>", "on.<pull_request>.<branches|tags>", and "on.<push|pull_request>.paths."Patterns to match branches and tags
feature/**wildcard matches any character, but does not match slash (/).feature/my-branchfeature/your-branchfeature/****wildcard matches any character including slash (/) in branch and tag names.feature/beta-a/my-branchfeature/your-branchfeature/mona/the/octocatmainreleases/mona-the-octocatmainreleases/mona-the-octocat'*'/). The*character is a special character in YAML. When you start a pattern with*, you must use quotes.mainreleases'**'branchesortagsfilter.all/the/branchesevery/tag'*feature'*character is a special character in YAML. When you start a pattern with*, you must use quotes.mona-featurefeaturever-10-featurev2*v2.v2v2.0v2.9v[12].[0-9]+.[0-9]+v1.10.1v2.0.0Patterns to match file paths
Path patterns must match the whole path, and start from the repository's root.
'*'*wildcard matches any character, but does not match slash (/). The*character is a special character in YAML. When you start a pattern with*, you must use quotes.README.mdserver.rb'*.jsx?'?character matches zero or one of the preceding character.page.jspage.jsx'**'**wildcard matches any character including slash (/). This is the default behavior when you don't use apathfilter.all/the/files.md'*.js'*wildcard matches any character, but does not match slash (/). Matches all.jsfiles at the root of the repository.app.jsindex.js'**.js'.jsfiles in the repository.index.jsjs/index.jssrc/js/app.jsdocs/*docsdirectory, at the root of the repository.docs/README.mddocs/file.txtdocs/**/docsdirectory at the root of the repository.docs/README.mddocs/mona/octocat.txtdocs/**/*.md.mdsuffix anywhere in thedocsdirectory.docs/README.mddocs/mona/hello-world.mddocs/a/markdown/file.md'**/docs/**'docsdirectory anywhere in the repository.docs/hello.mddir/docs/my-file.txtspace/docs/plan/space.doc'**/README.md'README.mdjs/README.md'**/*src/**'srcsuffix anywhere in the repository.a/src/app.jsmy-src/code/js/app.js'**/*-post.md'-post.mdanywhere in the repository.my-post.mdpath/their-post.md'**/migrate-*.sql'migrate-and suffix.sqlanywhere in the repository.migrate-10909.sqldb/migrate-v1.0.sqldb/sept/migrate-v1.sql*.md!README.md!) in front of a pattern negates it. When a file matches a pattern and also matches a negative pattern defined later in the file, the file will not be included.hello.mdDoes not match
README.mddocs/hello.md*.md!README.mdREADME*hello.mdREADME.mdREADME.doc