New translation batch for pt (#27294)
* Add crowdin translations * Run script/i18n/homogenize-frontmatter.js * Run script/i18n/fix-translation-errors.js * Run script/i18n/lint-translation-files.js --check rendering * run script/i18n/reset-files-with-broken-liquid-tags.js --language=pt * run script/i18n/reset-known-broken-translation-files.js Co-authored-by: Robert Sese <rsese@github.com>
This commit is contained in:
@@ -25,7 +25,7 @@ Para acessar seu quadro pessoal assim que se conectar, clique no {% octicon "mar
|
||||
|
||||
## Encontrar sua atividade recente
|
||||
|
||||
Na seção "Recent activity" (Atividade recente) do feed de notícias, você pode encontrar e acompanhar problemas e pull requests recém-atualizados nos quais você está trabalhando, além de visualizar até 12 atualizações recentes feitas nas últimas duas semanas.
|
||||
Na seção "Recent activity" (Atividade recente) do feed de notícias, você pode encontrar e acompanhar problemas e pull requests recém-atualizados nos quais você está trabalhando, além de visualizar até 4 atualizações recentes feitas nas últimas duas semanas.
|
||||
|
||||
{% data reusables.dashboard.recent-activity-qualifying-events %}
|
||||
|
||||
|
||||
@@ -20,14 +20,6 @@ Você pode querer usar um tema escuro para reduzir o consumo de energia em certo
|
||||
|
||||
{% ifversion fpt or ghes > 3.2 or ghae-issue-4618 or ghec %}Se você tiver baixa visão, você poderá aproveitar um tema de alto contraste, com maior contraste entre o primeiro plano e os elementos de segundo plano.{% endif %}{% ifversion fpt or ghae-issue-4619 or ghec %} se você for daltônico, você poderá beneficiar-se dos nossos temas de cor clara e escura.
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
{% note %}
|
||||
|
||||
**Observação:** Os temas coloridos estão atualmente em beta público. Para obter mais informações sobre como habilitar funcionalidades no beta público, consulte "[Explorando versões de acesso antecipado com visualização de funcionalidades](/get-started/using-github/exploring-early-access-releases-with-feature-preview)".
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% data reusables.user-settings.access_settings %}
|
||||
|
||||
@@ -65,7 +65,7 @@ Os exemplos abaixo demonstram o uso da ação `fwal/setup-fast`.
|
||||
|
||||
### Usando várias versões do Swift
|
||||
|
||||
Você pode configurar seu trabalho para usar várias versões do Swift em uma matriz de criação.
|
||||
You can configure your job to use multiple versions of Swift in a matrix.
|
||||
|
||||
```yaml{:copy}
|
||||
{% data reusables.actions.actions-not-certified-by-github-comment %}
|
||||
|
||||
@@ -23,7 +23,7 @@ miniTocMaxHeadingLevel: 3
|
||||
|
||||
Os contextos são uma forma de acessar informações sobre execuções de fluxo de trabalho, ambientes dos executores, trabalhos e etapas. Cada contexto é um objeto que contém propriedades, que podem ser strings ou outros objetos.
|
||||
|
||||
{% data reusables.actions.context-contents %} Por exemplo, o contexto `matriz` só é povoado para trabalhos em uma matriz[matriz de construção](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix).
|
||||
{% data reusables.actions.context-contents %} For example, the `matrix` context is only populated for jobs in a [matrix](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix).
|
||||
|
||||
Você pode acessar contextos usando a sintaxe da expressão. Para obter mais informações, consulte "[Expressões](/actions/learn-github-actions/expressions)".
|
||||
|
||||
@@ -537,19 +537,19 @@ O conteúdo de exemplo do contexto dos `segredos` mostra o `GITHUB_TOKEN` autom
|
||||
|
||||
## Contexto `estratégia`
|
||||
|
||||
Para fluxos de trabalho com uma matriz de compilação, o contexto `estratégia` contém informações sobre a estratégia de execução da matriz para o trabalho atual.
|
||||
For workflows with a matrix, the `strategy` context contains information about the matrix execution strategy for the current job.
|
||||
|
||||
| Nome da propriedade | Tipo | Descrição |
|
||||
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `strategy` | `objeto` | Esse contexto altera cada trabalho em uma execução de fluxo de trabalho. Você pode acessar este contexto a partir de qualquer trabalho ou etapa em um fluxo de trabalho. Este objeto contém todas as propriedades listadas abaixo. |
|
||||
| `strategy.fail-fast` | `string` | Quando `verdadeiro`, todos os trabalhos em andamento são cancelados se qualquer trabalho em uma matriz de compilação falhar. Para obter mais informações, consulte "[Sintaxe de fluxo de trabalho para o {% data variables.product.prodname_actions %}](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast)". |
|
||||
| `strategy.job-index` | `string` | O índice do trabalho atual na matriz de compilação. **Observação:** Este número é um número baseado em zero. O primeiro índice do trabalho na matriz de compilação é `0`. |
|
||||
| `strategy.job-total` | `string` | O número total de trabalhos na matriz de construção. **Observação:** Este número **não é** um número baseado em zero. Por exemplo, para uma matriz de construção com quatro trabalhos, o valor de `job-total de` é `4`. |
|
||||
| `strategy.max-parallel` | `string` | Número máximo de trabalhos que podem ser executados simultaneamente ao usar uma estratégia de trabalho de `matrix`. Para obter mais informações, consulte "[Sintaxe de fluxo de trabalho para o {% data variables.product.prodname_actions %}](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel)". |
|
||||
| Nome da propriedade | Tipo | Descrição |
|
||||
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `strategy` | `objeto` | Esse contexto altera cada trabalho em uma execução de fluxo de trabalho. Você pode acessar este contexto a partir de qualquer trabalho ou etapa em um fluxo de trabalho. Este objeto contém todas as propriedades listadas abaixo. |
|
||||
| `strategy.fail-fast` | `string` | When `true`, all in-progress jobs are canceled if any job in a matrix fails. Para obter mais informações, consulte "[Sintaxe de fluxo de trabalho para o {% data variables.product.prodname_actions %}](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast)". |
|
||||
| `strategy.job-index` | `string` | The index of the current job in the matrix. **Observação:** Este número é um número baseado em zero. The first job's index in the matrix is `0`. |
|
||||
| `strategy.job-total` | `string` | The total number of jobs in the matrix. **Observação:** Este número **não é** um número baseado em zero. For example, for a matrix with four jobs, the value of `job-total` is `4`. |
|
||||
| `strategy.max-parallel` | `string` | Número máximo de trabalhos que podem ser executados simultaneamente ao usar uma estratégia de trabalho de `matrix`. Para obter mais informações, consulte "[Sintaxe de fluxo de trabalho para o {% data variables.product.prodname_actions %}](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel)". |
|
||||
|
||||
### Exemplo de conteúdo do contexto `estratégia`
|
||||
|
||||
O conteúdo de exemplo a seguir do contexto `estratégia` é de uma matriz de construção com quatro trabalhos, e é tirada do trabalho final. Observe a diferença entre o número de `job-index` baseado em zero e o total de `job-job` que não é baseado em zero.
|
||||
The following example contents of the `strategy` context is from a matrix with four jobs, and is taken from the final job. Observe a diferença entre o número de `job-index` baseado em zero e o total de `job-job` que não é baseado em zero.
|
||||
|
||||
```yaml
|
||||
{
|
||||
@@ -562,7 +562,7 @@ O conteúdo de exemplo a seguir do contexto `estratégia` é de uma matriz de co
|
||||
|
||||
### Exemplo de uso do contexto `estratégia`
|
||||
|
||||
Esse exemplo de fluxo de trabalho usa a propriedade `strategy.job-index` para definir um nome exclusivo para um arquivo de registro para cada trabalho em uma matriz de criação.
|
||||
This example workflow uses the `strategy.job-index` property to set a unique name for a log file for each job in a matrix.
|
||||
|
||||
```yaml{:copy}
|
||||
name: Test matrix
|
||||
@@ -587,18 +587,18 @@ jobs:
|
||||
|
||||
## Contexto `matriz`
|
||||
|
||||
Para fluxos de trabalho com uma matriz de construção, o contexto `matriz` contém as propriedades definidas no arquivo do fluxo de trabalho que se aplicam ao trabalho atual. Por exemplo, se você configurar uma matriz de construção com as chaves `os` e `nó`, o objeto do contexto `matriz` irá incluir as propriedades `os` e `nó` com os valores usados para o trabalho atual.
|
||||
For workflows with a matrix, the `matrix` context contains the matrix properties defined in the workflow file that apply to the current job. For example, if you configure a matrix with the `os` and `node` keys, the `matrix` context object includes the `os` and `node` properties with the values that are being used for the current job.
|
||||
|
||||
Não há propriedades padrão no contexto `matriz`, apenas as que são definidas no arquivo do fluxo de trabalho.
|
||||
|
||||
| Nome da propriedade | Tipo | Descrição |
|
||||
| ------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `matrix` | `objeto` | Esse contexto só está disponível para trabalhos em uma matriz de compilação e alterações para cada trabalho na execução de um fluxo de trabalho. 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. |
|
||||
| `matrix.<property_name>` | `string` | O valor da propriedade de uma matriz. |
|
||||
| Nome da propriedade | Tipo | Descrição |
|
||||
| ------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `matrix` | `objeto` | This context is only available for jobs in a matrix, and changes for each job in a workflow run. 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. |
|
||||
| `matrix.<property_name>` | `string` | O valor da propriedade de uma matriz. |
|
||||
|
||||
### Exemplo de conteúdo do contexto `matriz`
|
||||
|
||||
O exemplo a seguir do contexto `matriz` é de um trabalho em uma matriz de construção que tem as propriedades de matriz `os` e `nó` definidas no fluxo de trabalho. O trabalho está executando a combinação matriz de um `ubuntu-latest` OS e do Node.js versão `16`.
|
||||
The following example contents of the `matrix` context is from a job in a matrix that has the `os` and `node` matrix properties defined in the workflow. O trabalho está executando a combinação matriz de um `ubuntu-latest` OS e do Node.js versão `16`.
|
||||
|
||||
```yaml
|
||||
{
|
||||
@@ -609,7 +609,7 @@ O exemplo a seguir do contexto `matriz` é de um trabalho em uma matriz de const
|
||||
|
||||
### Exemplo de uso do contexto `matriz`
|
||||
|
||||
Este exemplo de fluxo de trabalho cria uma matriz de compilação com as chaves `os` e `nós`. Ele usa a propriedade `matriz.os` para definir o tipo de executor para cada trabalho e usa a propriedade `matrix.node` para definir a versão do Node.js para cada trabalho.
|
||||
This example workflow creates a matrix with `os` and `node` keys. Ele usa a propriedade `matriz.os` para definir o tipo de executor para cada trabalho e usa a propriedade `matrix.node` para definir a versão do Node.js para cada trabalho.
|
||||
|
||||
```yaml{:copy}
|
||||
name: Test matrix
|
||||
|
||||
@@ -50,7 +50,7 @@ Tanto o CircleCI quanto o {% data variables.product.prodname_actions %} configur
|
||||
|
||||
Tanto o CircleCI quanto o {% data variables.product.prodname_actions %} fornecem um mecanismo para reutilizar e compartilhar tarefas em um fluxo de trabalho. O CircleCI usa um conceito chamado orbs, escrito em YAML, para fornecer tarefas que as pessoas podem reutilizar em um fluxo de trabalho. O {% data variables.product.prodname_actions %} tem componentes potentes, reutilizáveis e flexíveis denominados ações, que você cria com arquivos JavaScript ou imagens Docker. Você pode criar ações gravando códigos personalizados que interajam com o seu repositório da maneira que você quiser, inclusive fazendo integrações com as APIs do {% data variables.product.product_name %} e qualquer API de terceiros disponível publicamente. Por exemplo, as ações podem publicar módulos npm, enviar alertas SMS quando problemas urgentes forem criados ou implantar códigos prontos para produção. Para obter mais informações, consulte "[Criar ações](/actions/creating-actions)".
|
||||
|
||||
O CircleCI pode reutilizar partes dos fluxos de trabalho com âncoras e aliases YAML. O {% data variables.product.prodname_actions %} suporta a necessidade mais comum de reutilização usando matrizes de criação. Para obter mais informações sobre matrizes de criação, consulte "[Gerenciar fluxos de trabalho complexos](/actions/learn-github-actions/managing-complex-workflows/#using-a-build-matrix)".
|
||||
O CircleCI pode reutilizar partes dos fluxos de trabalho com âncoras e aliases YAML. {% data variables.product.prodname_actions %} supports the most common need for reusability using matrices. For more information about matrices, see "[Using a matrix for your jobs](/actions/using-jobs/using-a-matrix-for-your-jobs)."
|
||||
|
||||
## Usar imagens do Docker
|
||||
|
||||
|
||||
@@ -83,9 +83,9 @@ O Jenkins pode executar os `stages` e as `etapas` em paralelo, enquanto o {% dat
|
||||
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [`paralelo`](https://jenkins.io/doc/book/pipeline/syntax/#parallel) | [`jobs.<job_id>.strategy.max-parallel`](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel) |
|
||||
|
||||
### Criar matriz
|
||||
### Matrix
|
||||
|
||||
Tanto o {% data variables.product.prodname_actions %} quanto o Jenkins permitem que você use uma matriz de criação para definir várias combinações de sistema.
|
||||
Both {% data variables.product.prodname_actions %} and Jenkins let you use a matrix to define various system combinations.
|
||||
|
||||
| Jenkins | {% data variables.product.prodname_actions %}
|
||||
| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
|
||||
@@ -59,9 +59,9 @@ O Travis CI pode usar `stages` para executar trabalhos em paralelo. Da mesma for
|
||||
|
||||
O Travis CI e {% data variables.product.prodname_actions %} são compatíveis com selos de status, o que permite que você indique se uma criação está sendo aprovada ou falhando. Para obter mais informações, consulte ["Adicionar um selo de status de fluxo de trabalho ao seu repositório](/actions/managing-workflow-runs/adding-a-workflow-status-badge)".
|
||||
|
||||
### Usar uma matriz de criação
|
||||
### Using a matrix
|
||||
|
||||
O Travis CI e {% data variables.product.prodname_actions %} são compatíveis com uma matriz de criação, o que permite que você realize testes usando combinações de sistemas operacionais e pacotes de software. Para obter mais informações, consulte "[Usar uma matriz de criação](/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix)".
|
||||
Travis CI and {% data variables.product.prodname_actions %} both support a matrix, allowing you to perform testing using combinations of operating systems and software packages. For more information, see "[Using a matrix for your jobs](/actions/using-jobs/using-a-matrix-for-your-jobs)."
|
||||
|
||||
Abaixo, há um exemplo de comparação da sintaxe para cada sistema:
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ children:
|
||||
- /using-jobs-in-a-workflow
|
||||
- /choosing-the-runner-for-a-job
|
||||
- /using-conditions-to-control-job-execution
|
||||
- /using-a-build-matrix-for-your-jobs
|
||||
- /using-a-matrix-for-your-jobs
|
||||
- /using-concurrency
|
||||
- /using-environments-for-jobs
|
||||
- /running-jobs-in-a-container
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
title: Usando uma matriz de construção para seus trabalhos
|
||||
shortTitle: Usando uma matriz de construção para seus trabalhos
|
||||
intro: Crie uma matriz de construção e defina variações para cada trabalho.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
miniTocMaxHeadingLevel: 4
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-beta %}
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## Visão Geral
|
||||
|
||||
{% data reusables.actions.jobs.section-using-a-build-matrix-for-your-jobs-strategy %}
|
||||
|
||||
## Criando uma matriz de diferentes configurações dos trabalhos
|
||||
|
||||
{% data reusables.actions.jobs.section-using-a-build-matrix-for-your-jobs-matrix %}
|
||||
|
||||
## Cancelando trabalhos restantes se um trabalho da `matriz` falhar
|
||||
|
||||
{% data reusables.actions.jobs.section-using-a-build-matrix-for-your-jobs-failfast %}
|
||||
|
||||
## Definindo o número máximo de trabalhos simultâneos em uma `matriz`
|
||||
|
||||
{% data reusables.actions.jobs.section-using-a-build-matrix-for-your-jobs-max-parallel %}
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
title: Using a matrix for your jobs
|
||||
shortTitle: Using a matrix
|
||||
intro: Create a matrix to define variations for each job.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
miniTocMaxHeadingLevel: 4
|
||||
redirect_from:
|
||||
- /actions/using-jobs/using-a-build-matrix-for-your-jobs
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-beta %}
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## About matrix strategies
|
||||
|
||||
{% data reusables.actions.jobs.about-matrix-strategy %}
|
||||
|
||||
## Using a matrix strategy
|
||||
|
||||
{% 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 %}
|
||||
|
||||
## Expanding or adding matrix configurations
|
||||
|
||||
{% 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 %}
|
||||
|
||||
## Excluding matrix configurations
|
||||
|
||||
{% data reusables.actions.jobs.matrix-exclude %}
|
||||
|
||||
## Handling failures
|
||||
|
||||
{% data reusables.actions.jobs.section-using-a-build-matrix-for-your-jobs-failfast %}
|
||||
|
||||
## Defining the maximum number of concurrent jobs
|
||||
|
||||
{% data reusables.actions.jobs.section-using-a-build-matrix-for-your-jobs-max-parallel %}
|
||||
@@ -105,9 +105,9 @@ jobs:
|
||||
|
||||
Para obter mais informações, consulte[Definindo trabalhos de pré-requisito](/actions/using-jobs/using-jobs-in-a-workflow#defining-prerequisite-jobs)".
|
||||
|
||||
### Usar uma matriz de criação
|
||||
### Using a matrix
|
||||
|
||||
Você pode usar uma matriz de criação se quiser que seu fluxo de trabalho execute testes em várias combinações de parâmetros como, por exemplo, sistemas operacionais, plataformas e linguagens. A matriz de criação é criada usando a palavra-chave `estratégia`, que recebe as opções de compilação como um array. Por exemplo, essa matriz de criação irá executar o trabalho várias vezes, usando diferentes versões do Node.js:
|
||||
{% data reusables.actions.jobs.about-matrix-strategy %} The matrix is created using the `strategy` keyword, which receives the build options as an array. For example, this matrix will run the job multiple times, using different versions of Node.js:
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -115,14 +115,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node: [6, 8, 10]
|
||||
node: [12, 14, 16]
|
||||
steps:
|
||||
- uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: {% raw %}${{ matrix.node }}{% endraw %}
|
||||
```
|
||||
|
||||
Para obter mais informações, consulte "[Usando uma matriz de construção para seus trabalhos](/actions/using-jobs/using-a-build-matrix-for-your-jobs)".
|
||||
For more information, see "[Using a matrix for your jobs](/actions/using-jobs/using-a-matrix-for-your-jobs)."
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
### Memorizar dependências
|
||||
|
||||
@@ -745,11 +745,39 @@ Se o tempo-limite exceder o tempo limite de execução do trabalho para o runner
|
||||
|
||||
## `jobs.<job_id>.strategy`
|
||||
|
||||
{% data reusables.actions.jobs.section-using-a-build-matrix-for-your-jobs-strategy %}
|
||||
Use `jobs.<job_id>.strategy` to use a matrix strategy for your jobs. {% data reusables.actions.jobs.about-matrix-strategy %} For more information, see "[Using a matrix for your jobs](/actions/using-jobs/using-a-matrix-for-your-jobs)."
|
||||
|
||||
### `jobs.<job_id>.strategy.matrix`
|
||||
|
||||
{% data reusables.actions.jobs.section-using-a-build-matrix-for-your-jobs-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`
|
||||
|
||||
|
||||
@@ -32,6 +32,12 @@ Antes de poder habilitar e configurar {% data variables.product.prodname_registr
|
||||
{% data reusables.package_registry.enable-enterprise-github-packages %}
|
||||
1. Em "Armazenamento de pacotes", selecione **Azure Blob Storage** e insira o nome do seu contêiner do Azure para seus pacotes de armazenamento e string de conexão. 
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** You can find your Azure Connection String by navigating to the Access Key menu in your Azure storage account. Usage of a SAS Token or SAS URL as connection string is not currently supported.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.enterprise_management_console.save-settings %}
|
||||
|
||||
## Próximas etapas
|
||||
|
||||
@@ -208,7 +208,7 @@ If this parameter is not used, the {% data variables.product.prodname_codeql_wor
|
||||
|
||||
{% data reusables.code-scanning.codeql-languages-bullets %}
|
||||
|
||||
The default {% data variables.product.prodname_codeql_workflow %} file contains a build matrix called `language` which lists the languages in your repository that are analyzed. {% data variables.product.prodname_codeql %} automatically populates this matrix when you add {% data variables.product.prodname_code_scanning %} to a repository. Using the `language` matrix optimizes {% data variables.product.prodname_codeql %} to run each analysis in parallel. We recommend that all workflows adopt this configuration due to the performance benefits of parallelizing builds. For more information about build matrices, see "[Managing complex workflows](/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix)."
|
||||
The default {% data variables.product.prodname_codeql_workflow %} file contains a matrix called `language` which lists the languages in your repository that are analyzed. {% data variables.product.prodname_codeql %} automatically populates this matrix when you add {% data variables.product.prodname_code_scanning %} to a repository. Using the `language` matrix optimizes {% data variables.product.prodname_codeql %} to run each analysis in parallel. We recommend that all workflows adopt this configuration due to the performance benefits of parallelizing builds. For more information about matrices, see "[Using a matrix for your jobs](/actions/using-jobs/using-a-matrix-for-your-jobs)."
|
||||
|
||||
{% data reusables.code-scanning.specify-language-to-analyze %}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ Se ocorrer uma falha na uma criação automática de código para uma linguagem
|
||||
|
||||
- Remova a etapa de `autobuild` do seu fluxo de trabalho de {% data variables.product.prodname_code_scanning %} e adicione etapas de criação específicas. Para obter informações sobre a edição do fluxo de trabalho, consulte "[Configurar {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning#editing-a-code-scanning-workflow)". Para obter mais informações sobre a substituição da etapa `autobuild`, consulte "[Configurar o fluxo de trabalho de {% data variables.product.prodname_codeql %} para linguagens compiladas](/code-security/secure-coding/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language)."
|
||||
|
||||
- Se seu fluxo de trabalho não especificar explicitamente linguagens para analisar, {% data variables.product.prodname_codeql %} irá detectar implicitamente as linguagens compiladas na sua base de código. Nesta configuração, das linguagens compiladas de C/C++, C#, e Java, {% data variables.product.prodname_codeql %} analisa apenas a linguagem com mais arquivos-fonte. Edite o fluxo de trabalho e adicione uma matriz de compilação especificando as linguagens que você deseja analisar. O fluxo de trabalho de análise do CodeQL padrão usa essa matriz.
|
||||
- Se seu fluxo de trabalho não especificar explicitamente linguagens para analisar, {% data variables.product.prodname_codeql %} irá detectar implicitamente as linguagens compiladas na sua base de código. Nesta configuração, das linguagens compiladas de C/C++, C#, e Java, {% data variables.product.prodname_codeql %} analisa apenas a linguagem com mais arquivos-fonte. Edit the workflow and add a matrix specifying the languages you want to analyze. O fluxo de trabalho de análise do CodeQL padrão usa essa matriz.
|
||||
|
||||
Os seguintes extratos de um fluxo de trabalho mostram como usar uma matriz dentro da estratégia de trabalho para especificar linguagens e, em seguida, fazer referência a cada linguagem dentro da etapa "Inicializar {% data variables.product.prodname_codeql %}:
|
||||
|
||||
@@ -186,7 +186,7 @@ Se você usar executores auto-hospedados para executar a análise do {% data var
|
||||
|
||||
### Usar criações da matriz para paralelizar a análise
|
||||
|
||||
O {% data variables.product.prodname_codeql_workflow %} padrão usa uma matriz de criação de linguagens, o que faz com que a análise de cada linguagem seja executada em paralelo. Se você especificou as linguagens que deseja analisar diretamente na etapa "Inicializar CodeQL", a análise de cada linguagem acontecerá sequencialmente. Para acelerar a análise de várias linguagens, modifique o seu fluxo de trabalho para usar uma matriz. Para obter mais informações, consulte a extração de fluxo de trabalho em "[Criação automática para falhas de linguagem compilada](#automatic-build-for-a-compiled-language-fails)" acima.
|
||||
The default {% data variables.product.prodname_codeql_workflow %} uses a matrix of languages, which causes the analysis of each language to run in parallel. Se você especificou as linguagens que deseja analisar diretamente na etapa "Inicializar CodeQL", a análise de cada linguagem acontecerá sequencialmente. Para acelerar a análise de várias linguagens, modifique o seu fluxo de trabalho para usar uma matriz. Para obter mais informações, consulte a extração de fluxo de trabalho em "[Criação automática para falhas de linguagem compilada](#automatic-build-for-a-compiled-language-fails)" acima.
|
||||
|
||||
### Reduz a quantidade de código em análise em um único fluxo de trabalho
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ shortTitle: Recursos de aprendizagem
|
||||
|
||||
## Usar o Git
|
||||
|
||||
Familiarize-se com o Git acessando o [site oficial do projeto Git](https://git-scm.com) e lendo o [livro do ProGit](http://git-scm.com/book). Você pode revisar a [lista de comandos Git](https://git-scm.com/docs) ou a [referência de consultas de comandos Git](http://gitref.org) e usar o simulador [Try Git](https://try.github.com) (Experimentar o Git).
|
||||
Familiarize-se com o Git acessando o [site oficial do projeto Git](https://git-scm.com) e lendo o [livro do ProGit](http://git-scm.com/book). You can also review the [Git command list](https://git-scm.com/docs).
|
||||
|
||||
## Usar {% data variables.product.product_name %}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ permissions: Organization owners can remove members from an organization.
|
||||
**Aviso:** Ao remover integrantes de uma organização:
|
||||
- O número de licenças pagas não faz o downgrade automaticamente. Para pagar menos licenças depois de remover os usuários da sua organização, siga as etapas em "[Fazer o downgrade das estações pagas da sua organização](/articles/downgrading-your-organization-s-paid-seats)".
|
||||
- Os integrantes removidos perderão o acesso às bifurcações privadas dos repositórios privados da sua organização, mas ainda poderão ter cópias locais. No entanto, eles não conseguem sincronizar as cópias locais com os repositórios da organização. As bifurcações privadas poderão ser restauradas se o usuário for [restabelecido como um integrante da organização](/articles/reinstating-a-former-member-of-your-organization) em até três meses após sua remoção da organização. Em última análise, você é responsável por garantir que as pessoas que perderam o acesso a um repositório excluam qualquer informação confidencial ou de propriedade intelectual.
|
||||
- When private repositories are forked to other organizations, those organizations are able to control access to the fork network. This means users may retain access to the forks even after losing access to the original organization because they will still have explicit access via a fork.
|
||||
{%- ifversion ghec %}
|
||||
- Os integrantes removidos também perderão acesso a bifurcações privadas dos repositórios internos da sua organização, se o integrante removido não for integrante de qualquer outra organização pertencente à mesma conta corporativa. Para obter mais informações, consulte "[Sobre contas corporativas](/admin/overview/about-enterprise-accounts)".
|
||||
{%- endif %}
|
||||
|
||||
@@ -14,12 +14,6 @@ sections:
|
||||
- When converting a user account to an organization, if the user account was an owner of the {% data variables.product.prodname_ghe_server %} enterprise account, the converted organization would incorrectly appear in the enterprise owner list.
|
||||
- The `/stafftools/users/ip_addresses/:address` page responded with a `500 Internal Server Error` when attempting to display the page for an IPv6 address.
|
||||
- Creating an impersonation OAuth token using the Enterprise Administration REST API resulted in an error when an integration matching the OAuth Application ID already existed.
|
||||
- |
|
||||
When using SAML encrypted assertions with {% data variables.product.prodname_ghe_server %} 3.4.0 and 3.4.1, a new XML attribute `WantAssertionsEncrypted` in the `SPSSODescriptor` contains an invalid attribute for SAML metadata. IdPs that consume this SAML metadata endpoint may encounter errors when validating the SAML metadata XML schema. A fix will be available in the next patch release. [Updated: 2022-04-11]
|
||||
|
||||
To work around this problem, you can take one of the two following actions.
|
||||
- Reconfigure the IdP by uploading a static copy of the SAML metadata without the `WantAssertionsEncrypted` attribute.
|
||||
- Copy the SAML metadata, remove `WantAssertionsEncrypted` attribute, host it on a web server, and reconfigure the IdP to point to that URL.
|
||||
changes:
|
||||
- Added support for replica domain names that are more than 63 characters.
|
||||
- Configuration errors that halt a config apply run are now output to the terminal in addition to the configuration log.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
A matrix strategy lets you use variables in a single job definition to automatically create multiple job runs that are based the combinations of the variables. For example, you can use a matrix strategy to test your code in multiple versions of a language or on multiple operating systems.
|
||||
@@ -0,0 +1,29 @@
|
||||
For example, this matrix will run 10 jobs, one for each combination of `os` and `version` in the matrix, plus a job for the `os` value of `windows-latest` and `version` value of `17`.
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
example_matrix:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
version: [12, 14, 16]
|
||||
include:
|
||||
- os: windows-latest
|
||||
version: 17
|
||||
```
|
||||
|
||||
If you don't specify any matrix variables, all configurations under `include` will run. For example, the following workflow would run two jobs, one for each `include` entry. This lets you take advantage of the matrix strategy without having a fully populated matrix.
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
includes_only:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- site: "production"
|
||||
datacenter: "site-a"
|
||||
- site: "staging"
|
||||
datacenter: "site-b"
|
||||
|
||||
```
|
||||
@@ -0,0 +1,22 @@
|
||||
To remove specific configurations defined in the matrix, use `jobs.<job_id>.strategy.matrix.exclude`. An excluded configuration only has to be a partial match for it to be excluded. For example, the following workflow will run nine jobs: one job for each of the 12 configurations, minus the one excluded job that matches `{os: macos-latest, version: 12, environment: production}`, and the two excluded jobs that match `{os: windows-latest, version: 16}`.
|
||||
|
||||
```yaml
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest]
|
||||
version: [12, 14, 16]
|
||||
environment: [staging, production]
|
||||
exclude:
|
||||
- os: macos-latest
|
||||
version: 12
|
||||
environment: production
|
||||
- os: windows-latest
|
||||
version: 16
|
||||
runs-on: {% raw %}${{ matrix.os }}{% endraw %}
|
||||
```
|
||||
|
||||
{% note %}
|
||||
|
||||
**Observação:** Todas as combinações de `incluir` são processadas depois de `excluir`. Isso permite que você use `incluir` para voltar a adicionar combinações que foram excluídas anteriormente.
|
||||
|
||||
{% endnote %}
|
||||
@@ -0,0 +1,22 @@
|
||||
For example, the following workflow will run six jobs, one for each combination of `os` and `node`. When the job for the `os` value of `windows-latest` and `node` value of `16` runs, an additional variable called `npm` with the value of `6` will be included in the job.
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
example_matrix:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest]
|
||||
node: [12, 14, 16]
|
||||
include:
|
||||
- os: windows-latest
|
||||
node: 16
|
||||
npm: 6
|
||||
runs-on: {% raw %}${{ matrix.os }}{% endraw %}
|
||||
steps:
|
||||
- uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: {% raw %}${{ matrix.node }}{% endraw %}
|
||||
- if: {% raw %}${{ matrix.npm }}{% endraw %}
|
||||
run: npm install -g npm@{% raw %}${{ matrix.npm }}{% endraw %}
|
||||
- run: npm --version
|
||||
```
|
||||
@@ -0,0 +1,30 @@
|
||||
You can use contexts to create matrices. Para obter mais informações sobre os contextos, consulte "[Contextos](/actions/learn-github-actions/contexts)".
|
||||
|
||||
For example, the following workflow triggers on the `repository_dispatch` event and uses information from the event payload to build the matrix. When a repository dispatch event is created with a payload like the one below, the matrix `version` variable will have a value of `[12, 14, 16]`. For more information about the `repository_dispatch` trigger, see "[Events that trigger workflows](/actions/using-workflows/events-that-trigger-workflows#repository_dispatch)."
|
||||
|
||||
```json
|
||||
{
|
||||
"event_type": "test",
|
||||
"client_payload": {
|
||||
"versions": [12, 14, 16]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```yaml
|
||||
on:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- test
|
||||
|
||||
jobs:
|
||||
example_matrix:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
version: {% raw %}${{ github.event.client_payload.versions }}{% endraw %}
|
||||
steps:
|
||||
- uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: {% raw %}${{ matrix.version }}{% endraw %}
|
||||
```
|
||||
@@ -0,0 +1,38 @@
|
||||
Use `jobs.<job_id>.strategy.matrix.include` to expand existing matrix configurations or to add new configurations. The value of `include` is a list of objects.
|
||||
|
||||
For each object in the `include` list, the key:value pairs in the object will be added to each of the matrix combinations if none of the key:value pairs overwrite any of the original matrix values. If the object cannot be added to any of the matrix combinations, a new matrix combination will be created instead. Note that the original matrix values will not be overwritten, but added matrix values can be overwritten.
|
||||
|
||||
For example, this matrix:
|
||||
|
||||
```yaml
|
||||
strategy:
|
||||
matrix:
|
||||
fruit: [apple, pear]
|
||||
animal: [cat, dog]
|
||||
include:
|
||||
- color: green
|
||||
- color: pink
|
||||
animal: cat
|
||||
- fruit: apple
|
||||
shape: circle
|
||||
- fruit: banana
|
||||
- fruit: banana
|
||||
animal: cat
|
||||
```
|
||||
|
||||
will result in six jobs with the following matrix combinations:
|
||||
|
||||
- `{fruit: apple, animal: cat, color: pink, shape: circle}`
|
||||
- `{fruit: apple, animal: dog, color: green, shape: circle}`
|
||||
- `{fruit: pear, animal: cat, color: pink}`
|
||||
- `{fruit: pear, animal: dog, color: green}`
|
||||
- `{fruit: banana}`
|
||||
- `{fruit: banana, animal: cat}`
|
||||
|
||||
following this logic:
|
||||
|
||||
- `{color: green}` is added to all of the original matrix combinations because it can be added without overwriting any part of the original combinations.
|
||||
- `{color: pink, animal: cat}` adds `color:pink` only to the original matrix combinations that include `animal: cat`. This overwrites the `color: green` that was added by the previous `include` entry.
|
||||
- `{fruit: apple, shape: circle}` adds `shape: circle` only to the original matrix combinations that include `fruit: apple`.
|
||||
- `{fruit: banana}` cannot be added to any original matrix combination without overwriting a value, so it is added as an additional matrix combination.
|
||||
- `{fruit: banana, animal: cat}` cannot be added to any original matrix combination without overwriting a value, so it is added as an additional matrix combination. It does not add to the `{fruit: banana}` matrix combination because that combination was not one of the original matrix combinations.
|
||||
@@ -0,0 +1,22 @@
|
||||
You can specify multiple variables to create a multi-dimensional matrix. A job will run for each possible combination of the variables.
|
||||
|
||||
For example, the following workflow specifies two variables:
|
||||
|
||||
- Two operating systems specified in the `os` variable
|
||||
- Three Node.js versions specified in the `version` variable
|
||||
|
||||
The workflow will run six jobs, one for each combination of the `os` and `version` variables. Each job will set the `runs-on` value to the current `os` value and will pass the current `version` value to the `actions/setup-node` action.
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
example_matrix:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-18.04, ubuntu-20.04]
|
||||
version: [10, 12, 14]
|
||||
runs-on: {% raw %}${{ matrix.os }}{% endraw %}
|
||||
steps:
|
||||
- uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: {% raw %}${{ matrix.version }}{% endraw %}
|
||||
```
|
||||
@@ -1 +1,23 @@
|
||||
When `jobs.<job_id>.strategy.fail-fast` is set to `true`, {% data variables.product.prodname_dotcom %} cancels all in-progress jobs in the matrix if any `matrix` job fails. Padrão: `true`
|
||||
You can control how job failures are handled with `jobs.<job_id>.strategy.fail-fast` and `jobs.<job_id>.continue-on-error`.
|
||||
|
||||
`jobs.<job_id>.strategy.fail-fast` applies to the entire matrix. If `jobs.<job_id>.strategy.fail-fast` is set to `true`, {% data variables.product.product_name %} will cancel all in-progress and queued jobs in the matrix if any job in the matrix fails. This property defaults to `true`.
|
||||
|
||||
`jobs.<job_id>.continue-on-error` applies to a single job. If `jobs.<job_id>.continue-on-error` is `true`, other jobs in the matrix will continue running even if the job with `jobs.<job_id>.continue-on-error: true` fails.
|
||||
|
||||
You can use `jobs.<job_id>.strategy.fail-fast` and `jobs.<job_id>.continue-on-error` together. For example, the following workflow will start four jobs. For each job, `continue-on-error` is determined by the value of `matrix.experimental`. If any of the jobs with `continue-on-error: false` fail, all jobs that are in progress or queued will be cancelled. If the job with `continue-on-error: true` fails, the other jobs will not be affected.
|
||||
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: {% raw %}${{ matrix.experimental }}{% endraw %}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
version: [6, 7, 8]
|
||||
experimental: [false]
|
||||
include:
|
||||
- version: 9
|
||||
experimental: true
|
||||
```
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
|
||||
Use `jobs.<job_id>.strategy.matrix` para definir uma matriz de diferentes configurações de trabalho. Uma matriz permite que você crie vários trabalhos que realizam a substituição de variável em uma definição de trabalho único. Por exemplo, você pode usar uma matriz para criar trabalhos para mais de uma versão compatível de uma linguagem de programação, sistema operacional ou ferramenta. Uma matriz reutiliza a configuração do trabalho e cria trabalho para cada matriz que você configurar.
|
||||
|
||||
{% data reusables.actions.usage-matrix-limits %}
|
||||
|
||||
Cada opção que você define na `matriz` tem uma chave e um valor. As chaves que você define tornam-se propriedades no contexto da `matriz` e você pode fazer referência à propriedade em outras áreas do seu arquivo de fluxo de trabalho. Por exemplo, se você definir a chave `os` que contém um array de sistemas operacionais, você poderá usar a propriedade `matrix.os` como o valor da palavra-chave `runs-on` para criar um trabalho para cada sistema operacional. Para obter mais informações, consulte "[Contextos](/actions/learn-github-actions/contexts)".
|
||||
|
||||
A ordem que você define uma `matriz` importa. A primeira opção que você definir será a primeira que será executada no seu fluxo de trabalho.
|
||||
|
||||
#### Exemplo: Executando várias versões do Node.js
|
||||
|
||||
Você pode especificar uma matriz ao fornecer um array para as opções de configuração. Por exemplo, se o executor for compatível com as versões 10, 12 e 14 do Node.js, você poderá especificar uma matriz dessas versões na `matriz`.
|
||||
|
||||
Este exemplo cria uma matriz de três trabalhos, definindo a chave `nó` para um array de três versões do Node.js. Para usar a matriz, o exemplo define a propriedade do contexto `matrix.node` como o valor do parâmetro `setup-node` de entrada da ação `node-version`. Como resultado, três trabalhos serão executados, cada uma usando uma versão diferente do Node.js.
|
||||
|
||||
```yaml
|
||||
strategy:
|
||||
matrix:
|
||||
node: [10, 12, 14]
|
||||
steps:
|
||||
# Configures the node version used on GitHub-hosted runners
|
||||
- uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
# The Node.js version to configure
|
||||
node-version: {% raw %}${{ matrix.node }}{% endraw %}
|
||||
```
|
||||
|
||||
A ação setup-node `` é a forma recomendada de configurar uma versão do Node.js ao usar executores hospedados em {% data variables.product.prodname_dotcom %}. Para obter mais informações, consulte a ação [`setup-node`](https://github.com/actions/setup-node).
|
||||
|
||||
#### Exemplo: Executando com vários sistemas operacionais
|
||||
|
||||
Você pode criar uma matriz para executar fluxos de trabalho em mais de um sistema operacional do executor. Você também pode especificar mais de uma configuração da matriz. Este exemplo cria uma matriz de 6 trabalhos:
|
||||
|
||||
- 2 sistemas operacionais especificados na array `os`
|
||||
- 3 versões do Node.js especificadas na array do `nó`
|
||||
|
||||
{% data reusables.repositories.actions-matrix-builds-os %}
|
||||
|
||||
```yaml
|
||||
runs-on: {% raw %}${{ matrix.os }}{% endraw %}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-18.04, ubuntu-20.04]
|
||||
node: [10, 12, 14]
|
||||
steps:
|
||||
- uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: {% raw %}${{ matrix.node }}{% endraw %}
|
||||
```
|
||||
|
||||
{% ifversion ghae %}
|
||||
Para obter mais informações sobre a configuração de executores auto-hospedados, consulte "[Sobre executores auto-hospedados](/actions/hosting-your-own-runners/about-self-hosted-runners)."
|
||||
{% else %}Para encontrar opções de configuração compatíveis com executores hospedados em {% data variables.product.prodname_dotcom %}, consulte "[Ambientes virtuais para executores hospedados em {% data variables.product.prodname_dotcom %}](/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners)."
|
||||
{% endif %}
|
||||
|
||||
#### Exemplo: Incluindo valores adicionais em combinações
|
||||
|
||||
Você pode adicionar opções de configurações para um trabalho de matriz de compilação existente. Por exemplo, se você quer usar uma versão específica do `npm` quando o trabalho que usa o `windows-latest` e a versão 8 do `nó` é executado, você pode usar `incluir` para especificar a opção adicional.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-18.04]
|
||||
node: [8, 10, 12, 14]
|
||||
include:
|
||||
# includes a new variable of npm with a value of 6
|
||||
# for the matrix leg matching the os and version
|
||||
- os: windows-latest
|
||||
node: 8
|
||||
npm: 6
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
#### Exemplo: Incluindo novas combinações
|
||||
|
||||
Você pode usar `incluir` para adicionar novos trabalhos a uma matriz de criação. Qualquer configuração sem correspondência de incluir será adicionadas à matriz. Por exemplo, se você quiser usar a versão 14 do `nó` para compilar em vários sistemas operacionais, mas quiser uma tarefa experimental extra a versão 15 do nó no Ubuntu, você poderá usar `incluir` para especificar essa tarefa adicional.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
node: [14]
|
||||
os: [macos-latest, windows-latest, ubuntu-18.04]
|
||||
include:
|
||||
- node: 15
|
||||
os: ubuntu-18.04
|
||||
experimental: true
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
#### Exemplo: Excluindo configurações de uma matriz
|
||||
|
||||
Você pode remover uma configuração específica definida na matriz de compilação usando a opção `exclude` (excluir). `exclude` remove um trabalho definido pela matriz de compilação. O número de trabalhos é o produto cruzado do número de sistemas operacionais (`os`) incluídos nos arrays fornecidos por você, menos quaisquer subtrações (`exclude`).
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-18.04]
|
||||
node: [8, 10, 12, 14]
|
||||
exclude:
|
||||
# excludes node 8 on macOS
|
||||
- os: macos-latest
|
||||
node: 8
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Observação:** Todas as combinações de `incluir` são processadas depois de `excluir`. Isso permite que você use `incluir` para voltar a adicionar combinações que foram excluídas anteriormente.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### Usando variáveis de ambiente em uma matriz
|
||||
|
||||
Você pode adicionar variáveis de ambiente personalizadas para cada combinação de testes usando a chave `include`. Em seguida, você pode se referir às variáveis de ambiente personalizadas em um passo posterior.
|
||||
|
||||
{% data reusables.actions.matrix-variable-example %}
|
||||
@@ -1,6 +1,13 @@
|
||||
Use `jobs.<job_id>.strategy.max-parallel` para definir o número máximo de trabalhos que podem ser executados simultaneamente ao usar uma estratégia de trabalho de `matriz`. Por padrão, o {% data variables.product.prodname_dotcom %} maximizará o número de trabalhos executados em paralelo dependendo dos executores disponíveis nas máquinas virtuais hospedadas no {% data variables.product.prodname_dotcom %}.
|
||||
By default, {% data variables.product.product_name %} will maximize the number of jobs run in parallel depending on runner availability. To set the maximum number of jobs that can run simultaneously when using a `matrix` job strategy, use `jobs.<job_id>.strategy.max-parallel`.
|
||||
|
||||
For example, the following workflow will run a maximum of two jobs at a time, even if there are runners available to run all six jobs at once.
|
||||
|
||||
```yaml
|
||||
strategy:
|
||||
max-parallel: 2
|
||||
jobs:
|
||||
example_matrix:
|
||||
strategy:
|
||||
max-parallel: 2
|
||||
matrix:
|
||||
version: [10, 12, 14]
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
```
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Use `jobs.<job_id>.strategy` para criar matriz para seus trabalhos. Você pode definir variações diferentes variações nas quais executar os trabalhos.
|
||||
@@ -0,0 +1,15 @@
|
||||
You can specify a single variable to create a single-dimension matrix.
|
||||
|
||||
For example, the following workflow defines the variable `version` with the values `[10, 12, 14]`. The workflow will run three jobs, one for each value in the variable. Each job will access the `version` value through the `matrix.version` context and pass the value as `node-version` to the `actions/setup-node` action.
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
example_matrix:
|
||||
strategy:
|
||||
matrix:
|
||||
version: [10, 12, 14]
|
||||
steps:
|
||||
- uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: {% raw %}${{ matrix.version }}{% endraw %}
|
||||
```
|
||||
@@ -0,0 +1,25 @@
|
||||
Use `jobs.<job_id>.strategy.matrix` para definir uma matriz de diferentes configurações de trabalho. Within your matrix, define one or more variables followed by an array of values. For example, the following matrix has a veriable called `version` with the value `[10, 12, 14]` and a variable called `os` with the value `[ubuntu-latest, windows-latest]`:
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
example_matrix:
|
||||
strategy:
|
||||
matrix:
|
||||
version: [10, 12, 14]
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
```
|
||||
|
||||
A job will run for each possible combination of the variables. In this example, the workflow will run six jobs, one for each combination of the `os` and `version` variables.
|
||||
|
||||
By default, {% data variables.product.product_name %} will maximize the number of jobs run in parallel depending on runner availability. The order of the variables in the matrix determines the order in which the jobs are created. The first variable you define will be the first job that is created in your workflow run. For example, the above matrix will create the jobs in the following order:
|
||||
|
||||
- `{version: 10, os: ubuntu-latest}`
|
||||
- `{version: 10, os: windows-latest}`
|
||||
- `{version: 12, os: ubuntu-latest}`
|
||||
- `{version: 12, os: windows-latest}`
|
||||
- `{version: 14, os: ubuntu-latest}`
|
||||
- `{version: 14, os: windows-latest}`
|
||||
|
||||
A matrix will generate a maximum of 256 jobs per workflow run. This limit applies to both {% data variables.product.product_name %}-hosted and self-hosted runners.
|
||||
|
||||
The variables that you define become properties in the `matrix` context, and you can reference the property in other areas of your workflow file. In this example, you can use `matrix.version` and `matrix.os` to access the current value of `version` and `os` that the job is using. Para obter mais informações, consulte "[Contextos](/actions/learn-github-actions/contexts)".
|
||||
@@ -1 +0,0 @@
|
||||
Ao definir uma matriz de sistemas operacionais, você deve definir o valor de `runs-on` para a propriedade de contexto de `matrix.os` que você definiu.
|
||||
@@ -9,9 +9,9 @@ Adobe | Adobe Service Token | adobe_service_token{% endif %}
|
||||
Adobe | Adobe Short-Lived Access Token | adobe_short_lived_access_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
Adobe | Adobe JSON Web Token | adobe_jwt{% endif %} Alibaba Cloud | Alibaba Cloud Access Key ID | alibaba_cloud_access_key_id Alibaba Cloud | Alibaba Cloud Access Key Secret | alibaba_cloud_access_key_secret
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Amazon | Amazon OAuth Client ID | amazon_oauth_client_id{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Amazon | Amazon OAuth Client Secret | amazon_oauth_client_secret{% endif %} Amazon Web Services (AWS) | Amazon AWS Access Key ID | aws_access_key_id Amazon Web Services (AWS) | Amazon AWS Secret Access Key | aws_secret_access_key
|
||||
{%- ifversion fpt or ghec or ghes > 3.2 or ghae-issue-5844 %}
|
||||
Amazon Web Services (AWS) | Amazon AWS Session Token | aws_session_token{% endif %}
|
||||
@@ -21,9 +21,9 @@ Amazon Web Services (AWS) | Amazon AWS Temporary Access Key ID | aws_temporary_a
|
||||
Asana | Asana Personal Access Token | asana_personal_access_token{% endif %} Atlassian | Atlassian API Token | atlassian_api_token Atlassian | Atlassian JSON Web Token | atlassian_jwt
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
Atlassian | Bitbucket Server Personal Access Token | bitbucket_server_personal_access_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Azure | Azure Active Directory Application Secret | azure_active_directory_application_secret{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Azure | Azure Cache for Redis Access Key | azure_cache_for_redis_access_key{% endif %} Azure | Azure DevOps Personal Access Token | azure_devops_personal_access_token Azure | Azure SAS Token | azure_sas_token Azure | Azure Service Management Certificate | azure_management_certificate
|
||||
{%- ifversion ghes < 3.4 or ghae or ghae-issue-5342 %}
|
||||
Azure | Azure SQL Connection String | azure_sql_connection_string{% endif %} Azure | Azure Storage Account Key | azure_storage_account_key
|
||||
@@ -63,7 +63,7 @@ GitHub | GitHub OAuth Access Token | github_oauth_access_token{% endif %}
|
||||
GitHub | GitHub Refresh Token | github_refresh_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
GitHub | GitHub App Installation Access Token | github_app_installation_access_token{% endif %} GitHub | GitHub SSH Private Key | github_ssh_private_key
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
GitLab | GitLab Access Token | gitlab_access_token{% endif %} GoCardless | GoCardless Live Access Token | gocardless_live_access_token GoCardless | GoCardless Sandbox Access Token | gocardless_sandbox_access_token
|
||||
{%- ifversion fpt or ghec or ghes > 3.2 or ghae-issue-5844 %}
|
||||
Google | Firebase Cloud Messaging Server Key | firebase_cloud_messaging_server_key{% endif %} Google | Google API Key | google_api_key Google | Google Cloud Private Key ID | google_cloud_private_key_id
|
||||
@@ -73,13 +73,13 @@ Google | Google Cloud Storage Access Key Secret | google_cloud_storage_access_ke
|
||||
Google | Google Cloud Storage Service Account Access Key ID | google_cloud_storage_service_account_access_key_id{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.2 or ghae-issue-5844 %}
|
||||
Google | Google Cloud Storage User Access Key ID | google_cloud_storage_user_access_key_id{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Google | Google OAuth Access Token | google_oauth_access_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Google | Google OAuth Client ID | google_oauth_client_id{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Google | Google OAuth Client Secret | google_oauth_client_secret{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Google | Google OAuth Refresh Token | google_oauth_refresh_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
Grafana | Grafana API Key | grafana_api_key{% endif %} HashiCorp | Terraform Cloud / Enterprise API Token | terraform_api_token HashiCorp | HashiCorp Vault Batch Token | hashicorp_vault_batch_token HashiCorp | HashiCorp Vault Service Token | hashicorp_vault_service_token Hubspot | Hubspot API Key | hubspot_api_key
|
||||
@@ -89,7 +89,7 @@ Intercom | Intercom Access Token | intercom_access_token{% endif %}
|
||||
Ionic | Ionic Personal Access Token | ionic_personal_access_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
Ionic | Ionic Refresh Token | ionic_refresh_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.4 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6944 %}
|
||||
JD Cloud | JD Cloud Access Key | jd_cloud_access_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.2 or ghae-issue-5844 %}
|
||||
JFrog | JFrog Platform Access Token | jfrog_platform_access_token{% endif %}
|
||||
@@ -103,15 +103,15 @@ Linear | Linear OAuth Access Token | linear_oauth_access_token{% endif %}
|
||||
Lob | Lob Live API Key | lob_live_api_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
Lob | Lob Test API Key | lob_test_api_key{% endif %} Mailchimp | Mailchimp API Key | mailchimp_api_key Mailgun | Mailgun API Key | mailgun_api_key
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Mapbox | Mapbox Secret Access Token | mapbox_secret_access_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
MessageBird | MessageBird API Key | messagebird_api_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
Meta | Facebook Access Token | facebook_access_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Midtrans | Midtrans Production Server Key | midtrans_production_server_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Midtrans | Midtrans Sandbox Server Key | midtrans_sandbox_server_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.2 or ghae-issue-5844 %}
|
||||
New Relic | New Relic Personal API Key | new_relic_personal_api_key{% endif %}
|
||||
@@ -121,11 +121,11 @@ New Relic | New Relic REST API Key | new_relic_rest_api_key{% endif %}
|
||||
New Relic | New Relic Insights Query Key | new_relic_insights_query_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.2 or ghae-issue-5844 %}
|
||||
New Relic | New Relic License Key | new_relic_license_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Notion | Notion Integration Token | notion_integration_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Notion | Notion OAuth Client Secret | notion_oauth_client_secret{% endif %} npm | npm Access Token | npm_access_token NuGet | NuGet API Key | nuget_api_key
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Octopus Deploy | Octopus Deploy API Key | octopus_deploy_api_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
Onfido | Onfido Live API Token | onfido_live_api_token{% endif %}
|
||||
@@ -147,7 +147,7 @@ Plivo | Plivo Auth Token | plivo_auth_token{% endif %} Postman | Postman API Key
|
||||
PyPI | PyPI API Token | pypi_api_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
RubyGems | RubyGems API Key | rubygems_api_key{% endif %} Samsara | Samsara API Token | samsara_api_token Samsara | Samsara OAuth Access Token | samsara_oauth_access_token
|
||||
{%- ifversion fpt or ghec or ghes > 3.4 or ghae %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6944 %}
|
||||
Segment | Segment Public API Token | segment_public_api_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
SendGrid | SendGrid API Key | sendgrid_api_key{% endif %}
|
||||
@@ -159,36 +159,36 @@ Sendinblue | Sendinblue SMTP Key | sendinblue_smtp_key{% endif %}
|
||||
Shippo | Shippo Live API Token | shippo_live_api_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
Shippo | Shippo Test API Token | shippo_test_api_token{% endif %} Shopify | Shopify App Shared Secret | shopify_app_shared_secret Shopify | Shopify Access Token | shopify_access_token Shopify | Shopify Custom App Access Token | shopify_custom_app_access_token Shopify | Shopify Private App Password | shopify_private_app_password Slack | Slack API Token | slack_api_token Slack | Slack Incoming Webhook URL | slack_incoming_webhook_url Slack | Slack Workflow Webhook URL | slack_workflow_webhook_url
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Square | Square Access Token | square_access_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Square | Square Production Application Secret | square_production_application_secret{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Square | Square Sandbox Application Secret | square_sandbox_application_secret{% endif %} SSLMate | SSLMate API Key | sslmate_api_key SSLMate | SSLMate Cluster Secret | sslmate_cluster_secret Stripe | Stripe API Key | stripe_api_key Stripe | Stripe Live API Secret Key | stripe_live_secret_key Stripe | Stripe Test API Secret Key | stripe_test_secret_key Stripe | Stripe Live API Restricted Key | stripe_live_restricted_key Stripe | Stripe Test API Restricted Key | stripe_test_restricted_key
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
Stripe | Stripe Webhook Signing Secret | stripe_webhook_signing_secret{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Supabase | Supabase Service Key | supabase_service_key{% endif %} Tableau | Tableau Personal Access Token | tableau_personal_access_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.1 or ghae %}
|
||||
Telegram | Telegram Bot Token | telegram_bot_token{% endif %} Tencent Cloud | Tencent Cloud Secret ID | tencent_cloud_secret_id
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Twilio | Twilio Access Token | twilio_access_token{% endif %} Twilio | Twilio Account String Identifier | twilio_account_sid Twilio | Twilio API Key | twilio_api_key
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Typeform | Typeform Personal Access Token | typeform_personal_access_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.4 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6944 %}
|
||||
WorkOS | WorkOS Production API Key | workos_production_api_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.4 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6944 %}
|
||||
WorkOS | WorkOS Staging API Key | workos_staging_api_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Yandex | Yandex.Cloud API Key | yandex_cloud_api_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Yandex | Yandex.Cloud IAM Cookie | yandex_cloud_iam_cookie{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Yandex | Yandex.Cloud IAM Token | yandex_cloud_iam_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Yandex | Yandex.Dictionary API Key | yandex_dictionary_api_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Yandex | Yandex.Predictor API Key | yandex_predictor_api_key{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5845 %}
|
||||
Yandex | Yandex.Translate API Key | yandex_translate_api_key{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user