Merge branch 'main' of github.com:github/docs-internal into validate-versioning
This commit is contained in:
@@ -16,7 +16,7 @@ shortTitle: Remove workflow artifacts
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning:** Once you delete an artifact, it can not be restored.
|
||||
**Warning:** Once you delete an artifact, it cannot be restored.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
|
||||
@@ -280,6 +280,10 @@ updates:
|
||||
prefix-development: "pip dev"
|
||||
include: "scope"
|
||||
```
|
||||
If you use the same configuration as in the example above, bumping the `requests` library in the `pip` development dependency group will generate a commit message of:
|
||||
|
||||
`pip dev: bump requests from 1.0.0 to 1.0.1`
|
||||
|
||||
### `ignore`
|
||||
|
||||
{% data reusables.dependabot.default-dependencies-allow-ignore %}
|
||||
|
||||
@@ -67,4 +67,4 @@ Assets are commonly found in the following locations:
|
||||
|:----------:|:-----------------------------------------:|:---------------------------------:|
|
||||
| CSS | `<link rel="stylesheet" href="http://example.com/css/main.css">` | `<link rel="stylesheet" href="https://example.com/css/main.css">`
|
||||
| JavaScript | `<script type="text/javascript" src="http://example.com/js/main.js"></script>` | `<script type="text/javascript" src="https://example.com/js/main.js"></script>`
|
||||
| Image | `<A HREF="http://www.somesite.com"><IMG SRC="http://www.example.com/logo.jpg" alt="Logo"></a>` | `<A HREF="https://www.somesite.com"><IMG SRC="https://www.example.com/logo.jpg" alt="Logo"></a>`
|
||||
| Image | `<a href="http://www.somesite.com"><img src="http://www.example.com/logo.jpg" alt="Logo"></a>` | `<a href="https://www.somesite.com"><img src="https://www.example.com/logo.jpg" alt="Logo"></a>`
|
||||
|
||||
@@ -25,9 +25,7 @@ children:
|
||||
- /getting-started-with-the-checks-api
|
||||
---
|
||||
This section of the documentation is intended to get you up-and-running with
|
||||
real-world {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API applications. We'll cover everything you need to know, from
|
||||
authentication, to manipulating results, to combining results with other apps.
|
||||
Every tutorial here will have a project, and every project will be
|
||||
stored and documented in our public
|
||||
real-world {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API applications. We'll go over everything you need to know, from authentication to results manipulation to integrating results with other apps.
|
||||
Every tutorial will include a project, and each project will be saved and documented in our public
|
||||
[platform-samples](https://github.com/github/platform-samples) repository.
|
||||

|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"created": true,
|
||||
"deleted": false,
|
||||
"forced": false,
|
||||
"base_ref": "refs/heads/main",
|
||||
"base_ref": null,
|
||||
"compare": "https://github.com/Codertocat/Hello-World/compare/simple-tag",
|
||||
"commits": [
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"created": true,
|
||||
"deleted": false,
|
||||
"forced": false,
|
||||
"base_ref": "refs/heads/main",
|
||||
"base_ref": null,
|
||||
"compare": "https://octocoders.github.io/Codertocat/Hello-World/compare/simple-tag",
|
||||
"commits": [
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"created": true,
|
||||
"deleted": false,
|
||||
"forced": false,
|
||||
"base_ref": "refs/heads/main",
|
||||
"base_ref": null,
|
||||
"compare": "https://octocoders.github.io/Codertocat/Hello-World/compare/simple-tag",
|
||||
"commits": [
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"created": true,
|
||||
"deleted": false,
|
||||
"forced": false,
|
||||
"base_ref": "refs/heads/main",
|
||||
"base_ref": null,
|
||||
"compare": "https://octocoders.github.io/Codertocat/Hello-World/compare/simple-tag",
|
||||
"commits": [
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ Você pode acessar contextos usando a sintaxe da expressão. Para obter mais inf
|
||||
| `matrix` | `objeto` | Contém as propriedades da matriz definidas no fluxo de trabalho que se aplicam ao trabalho atual. Para obter mais informações, consulte o contexto [`matriz`](#matrix-context). |
|
||||
| `needs` | `objeto` | Contém os resultados de todos os trabalhos que são definidos como uma dependência do trabalho atual. Para obter mais informações, consulte o contexto [`needs`](#needs-context). |
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-4757 %}
|
||||
| `entradas` | `objeto` | Contém a entrada de um fluxo de trabalho reutilizável. Para obter mais informações, consulte o contexto [`entradas`](#inputs-context). |{% endif %}
|
||||
| `inputs` | `object` | Contains the inputs of a reusable {% ifversion actions-unified-inputs %}or manually triggered {% endif %}workflow. Para obter mais informações, consulte o contexto [`entradas`](#inputs-context). |{% endif %}
|
||||
|
||||
Como parte de uma expressão, você pode acessar informações de contexto usando uma das duas sintaxes.
|
||||
|
||||
@@ -699,33 +699,32 @@ jobs:
|
||||
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-4757 %}
|
||||
## Contexto `entradas`
|
||||
|
||||
O contexto `entrada` contém propriedades de entrada passada para um fluxo de trabalho reutilizável. Os nomes e tipos de entrada são definidos na configuração do evento de [`workflow_call` ](/actions/learn-github-actions/events-that-trigger-workflows#workflow-reuse-events) de um fluxo de trabalhoreutilizável, e os valores de entrada são passados de [trabalhos de`.<job_id>.com`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idwith) para um fluxo de trabalho externo que chama o fluxo de trabalho reutilizável.
|
||||
The `inputs` context contains input properties passed to a reusable workflow{% ifversion actions-unified-inputs %} or to a manually triggered workflow{% endif %}. {% ifversion actions-unified-inputs %}For reusable workflows, the{% else %}The{% endif %} input names and types are defined in the [`workflow_call` event configuration](/actions/learn-github-actions/events-that-trigger-workflows#workflow-reuse-events) of a reusable workflow, and the input values are passed from [`jobs.<job_id>.with`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idwith) in an external workflow that calls the reusable workflow. {% ifversion actions-unified-inputs %}For manually triggered workflows, the inputs are defined in the [`workflow_dispatch` event configuration](/actions/learn-github-actions/events-that-trigger-workflows#workflow_dispatch) of a workflow.{% endif %}
|
||||
|
||||
Não há propriedades padrão no contexto `entradas`, apenas aquelas definidas no arquivo de fluxo de trabalho reutilizável.
|
||||
There are no standard properties in the `inputs` context, only those which are defined in the workflow file.
|
||||
|
||||
{% data reusables.actions.reusable-workflows-ghes-beta %}
|
||||
|
||||
Para obter mais informações, consulte "[Reutilizando fluxos de trabalho](/actions/learn-github-actions/reusing-workflows)".
|
||||
|
||||
| Nome da propriedade | Tipo | Descrição |
|
||||
| --------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `inputs` | `objeto` | Este contexto só está disponível em um [fluxo de trabalho reutilizável](/actions/learn-github-actions/reusing-workflows). Você pode acessar este contexto a partir de qualquer trabalho ou etapa em um fluxo de trabalho. Este objeto contém as propriedades listadas abaixo. |
|
||||
| `inputs.<name>` | `string` ou `número` ou `booleano` | Cada valor de entrada é passado de um fluxo de trabalho externo. |
|
||||
| Nome da propriedade | Tipo | Descrição |
|
||||
| --------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `inputs` | `objeto` | This context is only available in a [reusable workflow](/actions/learn-github-actions/reusing-workflows){% ifversion actions-unified-inputs %} or in a workflow triggered by the [`workflow_dispatch` event](/actions/learn-github-actions/events-that-trigger-workflows#workflow_dispatch){% endif %}. Você pode acessar este contexto a partir de qualquer trabalho ou etapa em um fluxo de trabalho. Este objeto contém as propriedades listadas abaixo. |
|
||||
| `inputs.<name>` | `string` ou `número` ou `booleano` | Cada valor de entrada é passado de um fluxo de trabalho externo. |
|
||||
|
||||
### Exemplo de conteúdo do contexto `entradas`
|
||||
|
||||
O conteúdo de exemplo das `entradas` contexto é de um trabalho em um fluxo de trabalho reutilizável que definiu as entradas de `build_id` e `deploy_target`.
|
||||
The following example contents of the `inputs` context is from a workflow that has defined the `build_id`, `deploy_target`, and `perform_deploy` inputs.
|
||||
|
||||
```yaml
|
||||
{
|
||||
"build_id": 123456768,
|
||||
"deploy_target": "deployment_sys_1a"
|
||||
"deploy_target": "deployment_sys_1a",
|
||||
"perform_deploy": true
|
||||
}
|
||||
```
|
||||
|
||||
### Exemplo de uso do contexto `entradas`
|
||||
### Example usage of the `inputs` context in a reusable workflow
|
||||
|
||||
Este exemplo de fluxo de trabalho reutilizável usa o contexto `entradas` para obter os valores das entradas `build_id` e `deploy_target` que foram passadas para o fluxo de trabalho reutilizável do fluxo de trabalho de chamadas.
|
||||
This example reusable workflow uses the `inputs` context to get the values of the `build_id`, `deploy_target`, and `perform_deploy` inputs that were passed to the reusable workflow from the caller workflow.
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
@@ -746,10 +745,42 @@ on:
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ inputs.perform_deploy == 'true' }}
|
||||
if: ${{ inputs.perform_deploy }}
|
||||
steps:
|
||||
- name: Deploy build to target
|
||||
run: deploy --build ${{ inputs.build_id }} --target ${{ inputs.deploy_target }}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% ifversion actions-unified-inputs %}
|
||||
### Example usage of the `inputs` context in a manually triggered workflow
|
||||
|
||||
This example workflow triggered by a `workflow_dispatch` event uses the `inputs` context to get the values of the `build_id`, `deploy_target`, and `perform_deploy` inputs that were passed to the workflow.
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
build_id:
|
||||
required: true
|
||||
type: string
|
||||
deploy_target:
|
||||
required: true
|
||||
type: string
|
||||
perform_deploy:
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ inputs.perform_deploy }}
|
||||
steps:
|
||||
- name: Deploy build to target
|
||||
run: deploy --build ${{ inputs.build_id }} --target ${{ inputs.deploy_target }}
|
||||
```
|
||||
{% endraw %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -17,7 +17,7 @@ versions:
|
||||
|
||||
## Sobre a reexecução de fluxos de trabalho e trabalhos
|
||||
|
||||
A reexecução de um fluxo de trabalho{% ifversion re-run-jobs %} ou trabalhos em um fluxo de trabalho{% endif %} usa o mesmo `GITHUB_SHA` (commit SHA) e `GITHUB_REF` (Git ref) do evento original que acionou a execução do fluxo de trabalho. Você pode executar novamente um fluxo de trabalho{% ifversion re-run-jobs %} ou trabalhos em um fluxo de trabalho{% endif %} por até 30 dias após a execução inicial.{% ifversion debug-reruns %} Ao executar novamente um fluxo de travalho ou trabalhos em um fluxo de trabalho, você pode habilitar o registro de depuração para a nova execução. Isso permitirá o registro de diagnóstico do executor e o registro de depuração de etapas para a nova execução. Para obter mais informações sobre o registro de depuração, consulte "[Habilitando o registro de depuração](/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)"{% endif %}
|
||||
A reexecução de um fluxo de trabalho{% ifversion re-run-jobs %} ou trabalhos em um fluxo de trabalho{% endif %} usa o mesmo `GITHUB_SHA` (commit SHA) e `GITHUB_REF` (Git ref) do evento original que acionou a execução do fluxo de trabalho. You can re-run a workflow{% ifversion re-run-jobs %} or jobs in a workflow{% endif %} for up to 30 days after the initial run.{% ifversion re-run-jobs %} You cannot re-run jobs in a workflow once its logs have passed their retention limits. For more information, see "[Usage limits, billing, and administration](/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy)."{% endif %}{% ifversion debug-reruns %} When you re-run a workflow or jobs in a workflow, you can enable debug logging for the re-run. Isso permitirá o registro de diagnóstico do executor e o registro de depuração de etapas para a nova execução. Para obter mais informações sobre o registro de depuração, consulte "[Habilitando o registro de depuração](/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)"{% endif %}
|
||||
|
||||
## Reexecutar todos os trabalhos em um fluxo de trabalho
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ shortTitle: Remover artefatos de fluxo de trabalho
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Aviso:** Após a exclusão de um artefato, este não poderá ser restaurado.
|
||||
**Warning:** Once you delete an artifact, it cannot be restored.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
|
||||
@@ -1250,12 +1250,13 @@ on: workflow_dispatch
|
||||
|
||||
#### Fornecendo entradas
|
||||
|
||||
É possível configurar as propriedades de entrada definidas por personalização, os valores-padrão de entrada e as entradas obrigatórias para o evento diretamente no seu fluxo de trabalho. Ao iniciar o evento, você pode fornecer `ref` e qualquer `entradas`. Quando o fluxo de trabalho é executado, você pode acessar os valores de entrada no contexto `github.event.inputs`. Para obter mais informações, consulte "[Contextos](/actions/learn-github-actions/contexts)".
|
||||
É possível configurar as propriedades de entrada definidas por personalização, os valores-padrão de entrada e as entradas obrigatórias para o evento diretamente no seu fluxo de trabalho. Ao iniciar o evento, você pode fornecer `ref` e qualquer `entradas`. When the workflow runs, you can access the input values in the {% ifversion actions-unified-inputs %}`inputs`{% else %}`github.event.inputs`{% endif %} context. Para obter mais informações, consulte "[Contextos](/actions/learn-github-actions/contexts)".
|
||||
|
||||
{% data reusables.actions.inputs-vs-github-event-inputs %}
|
||||
|
||||
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %}
|
||||
Este exemplo define as entradas chamadas `logLevel`, `tags` e `ambiente`. Você passa os valores destas entradas para o fluxo de trabalho quando o executa. Esse fluxo de trabalho imprime os valores no registro, usando as propriedades de contexto `github.event.inputs.logLevel`, `github.event.inputs.tags` e `github.event.inputs.environment`.
|
||||
Este exemplo define as entradas chamadas `logLevel`, `tags` e `ambiente`. Você passa os valores destas entradas para o fluxo de trabalho quando o executa. This workflow then prints the values to the log, using the {% ifversion actions-unified-inputs %}`inputs.logLevel`, `inputs.tags`, and `inputs.environment`{% else %}`github.event.inputs.logLevel`, `github.event.inputs.tags`, and `github.event.inputs.environment`{% endif %} context properties.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -1287,11 +1288,10 @@ jobs:
|
||||
echo "Tags: $TAGS"
|
||||
echo "Environment: $ENVIRONMENT"
|
||||
env:
|
||||
LEVEL: ${{ github.event.inputs.logLevel }}
|
||||
TAGS: ${{ github.event.inputs.tags }}
|
||||
ENVIRONMENT: ${{ github.event.inputs.environment }}
|
||||
LEVEL: {% ifversion actions-unified-inputs %}{% raw %}${{ inputs.logLevel }}{% endraw %}{% else %}{% raw %}${{ github.event.inputs.logLevel }}{% endraw %}{% endif %}
|
||||
TAGS: {% ifversion actions-unified-inputs %}{% raw %}${{ inputs.tags }}{% endraw %}{% else %}{% raw %}${{ github.event.inputs.tags }}{% endraw %}{% endif %}
|
||||
ENVIRONMENT: {% ifversion actions-unified-inputs %}{% raw %}${{ inputs.environment }}{% endraw %}{% else %}{% raw %}${{ github.event.inputs.environment }}{% endraw %}{% endif %}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
Se você executar este fluxo de trabalho em um navegador, você deverá inserir valores para as entradas necessárias manualmente antes de o fluxo de trabalho ser executado.
|
||||
|
||||
@@ -1306,7 +1306,7 @@ gh workflow run run-tests.yml -f logLevel=warning -f tags=false -f environment=s
|
||||
Para obter mais informações, consulte as informações do {% data variables.product.prodname_cli %} em "[Executando um fluxo de trabalho manualmente](/actions/managing-workflow-runs/manually-running-a-workflow)".
|
||||
|
||||
{% else %}
|
||||
Este exemplo define as entradas do `nome` e `home` e as imprime usando os contextos `github.event.inputs.name` e `github.event.inputs.home`. Se `home` não for fornecido, será impresso o valor-padrão 'The Octoverse'.
|
||||
This example defines the `name` and `home` inputs and prints them using the {% ifversion actions-unified-inputs %}`inputs.name` and `inputs.home`{% else %}`github.event.inputs.name` and `github.event.inputs.home`{% endif %} contexts. Se `home` não for fornecido, será impresso o valor-padrão 'The Octoverse'.
|
||||
|
||||
```yaml
|
||||
name: Manually triggered workflow
|
||||
@@ -1330,8 +1330,8 @@ jobs:
|
||||
echo Hello $NAME!
|
||||
echo -in $HOME
|
||||
env:
|
||||
NAME: {% raw %}${{ github.event.inputs.name }}{% endraw %}
|
||||
HOME: {% raw %}${{ github.event.inputs.home }}{% endraw %}
|
||||
NAME: {% ifversion actions-unified-inputs %}{% raw %}${{ inputs.name }}{% endraw %}{% else %}{% raw %}${{ github.event.inputs.name }}{% endraw %}{% endif %}
|
||||
HOME: {% ifversion actions-unified-inputs %}{% raw %}${{ github.event.inputs.home }}{% endraw %}{% else %}{% raw %}${{ github.event.inputs.home }}{% endraw %}{% endif %}
|
||||
```
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -280,6 +280,10 @@ updates:
|
||||
prefix-development: "pip dev"
|
||||
include: "scope"
|
||||
```
|
||||
If you use the same configuration as in the example above, bumping the `requests` library in the `pip` development dependency group will generate a commit message of:
|
||||
|
||||
`pip dev: bump requests from 1.0.0 to 1.0.1`
|
||||
|
||||
### `ignore`
|
||||
|
||||
{% data reusables.dependabot.default-dependencies-allow-ignore %}
|
||||
|
||||
@@ -66,4 +66,4 @@ Os ativos geralmente são encontrados nos seguintes locais:
|
||||
|:-------------:|:--------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------:|
|
||||
| CSS | `<link rel="stylesheet" href="http://example.com/css/main.css">` | `<link rel="stylesheet" href="https://example.com/css/main.css">` |
|
||||
| JavaScript | `<script type="text/javascript" src="http://example.com/js/main.js"></script>` | `<script type="text/javascript" src="https://example.com/js/main.js"></script>` |
|
||||
| Imagem | `<A HREF="http://www.somesite.com"><IMG SRC="http://www.example.com/logo.jpg" alt="Logotipo"></a>` | `<A HREF="https://www.somesite.com"><IMG SRC="https://www.example.com/logo.jpg" alt="Logotipo"></a>` |
|
||||
| Imagem | `<a href="http://www.somesite.com"><img src="http://www.example.com/logo.jpg" alt="Logotipo"></a>` | `<a href="https://www.somesite.com"><img src="https://www.example.com/logo.jpg" alt="Logotipo"></a>` |
|
||||
|
||||
@@ -25,4 +25,4 @@ children:
|
||||
- /getting-started-with-the-checks-api
|
||||
---
|
||||
|
||||
Esta seção da documentação tem o objetivo de ajudar você a executar os aplicativos reais {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} da API. Vamos cobrir tudo o que você precisa saber, desde a autenticação, passando pela a manipulação de resultados, até a combinação de resultados com outros aplicativos. Todos os tutoriais aqui terão um projeto, e cada projeto será armazenado e documentado no nosso repositório público de [platform-samples](https://github.com/github/platform-samples). 
|
||||
Esta seção da documentação tem o objetivo de ajudar você a executar os aplicativos reais {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} da API. We'll go over everything you need to know, from authentication to results manipulation to integrating results with other apps. Every tutorial will include a project, and each project will be saved and documented in our public [platform-samples](https://github.com/github/platform-samples) repository. 
|
||||
|
||||
@@ -21,7 +21,7 @@ O formato e os valores permitidos são os mesmos que [frontmatter versions prope
|
||||
|
||||
### Condicionais de Liquid
|
||||
|
||||
Agora você pode usar `{% if meow %} ... {% endif %}` nos arquivos de conteúdo! Observe que esta é a tag `if`, não a nova tag `ifversion`.
|
||||
Agora você pode usar `{% ifversion meow %} ... {% endif %}` nos arquivos de conteúdo!
|
||||
|
||||
### Frontmatter
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
#Issue 6921
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.6'
|
||||
ghae: 'issue-6921'
|
||||
@@ -0,0 +1,8 @@
|
||||
{% ifversion actions-unified-inputs %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: The workflow will also receive the inputs in the `github.event.inputs` context. The information in the `inputs` context and `github.event.inputs` context is identical except that the `inputs` context preserves Boolean values as Booleans instead of converting them to strings.
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
@@ -1,6 +1,8 @@
|
||||
Ao usar o evento `workflow_dispatch`, você pode, opcionalmente, especificar as entradas que são passadas para o fluxo de trabalho.
|
||||
|
||||
O fluxo de trabalho acionado recebe as entradas no contexto `github.event.inputs`. Para obter mais informações, consulte "[Contextos](/actions/learn-github-actions/contexts#github-context)".
|
||||
The triggered workflow receives the inputs in the {% ifversion actions-unified-inputs %}`inputs`{% else %}`github.event.inputs`{% endif %} context. For more information, see "[Contexts]({% ifversion actions-unified-inputs %}/actions/learn-github-actions/contexts#inputs-context{% else %}/actions/learn-github-actions/contexts#github-context{% endif %})."
|
||||
|
||||
{% data reusables.actions.inputs-vs-github-event-inputs %}
|
||||
|
||||
```yaml
|
||||
on:
|
||||
@@ -31,8 +33,8 @@ on:
|
||||
jobs:
|
||||
print-tag:
|
||||
runs-on: ubuntu-latest
|
||||
if: {% raw %} ${{ github.event.inputs.print_tags == 'true' }} {% endraw %}
|
||||
if: {% ifversion actions-unified-inputs %}{% raw %} ${{ inputs.print_tags }} {% endraw %}{% else %}{% raw %} ${{ github.event.inputs.print_tags == 'true' }} {% endraw %}{% endif %}
|
||||
steps:
|
||||
- name: Print the input tag to STDOUT
|
||||
run: echo {% raw %} The tags are ${{ github.event.inputs.tags }} {% endraw %}
|
||||
run: {% ifversion actions-unified-inputs %}echo {% raw %} The tags are ${{ inputs.tags }} {% endraw %}{% else %}echo {% raw %} The tags are ${{ github.event.inputs.tags }} {% endraw %}{% endif %}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user