Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 42 additions & 6 deletions data/reusables/actions/jobs/section-defining-outputs-for-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Job outputs containing expressions are evaluated on the runner at the end of eac

To use job outputs in a dependent job, you can use the `needs` context. For more information, see "[AUTOTITLE](/actions/learn-github-actions/contexts#needs-context)."

{% note %}

**Note:** `$GITHUB_OUTPUT` is shared between all steps in a job. If you use the same output name in multiple steps, the last step to write to the output will override the value. If your job uses a matrix and writes to `$GITHUB_OUTPUT`, the content will be overwritten for each matrix combination. You can use the `matrix` context to create unique output names for each job configuration. For more information, see "[AUTOTITLE](/actions/learn-github-actions/contexts#matrix-context)."

{% endnote %}

### Example: Defining outputs for a job

{% raw %}
Expand Down Expand Up @@ -40,3 +34,45 @@ jobs:
```

{% endraw %}

### Using Job Outputs in a Matrix Job

Matrices can be used to generate multiple outputs of different names. When using a matrix, job outputs will be combined from all jobs inside the matrix.

{% raw %}

```yaml
jobs:
job1:
runs-on: ubuntu-latest
outputs:
output_1: ${{ steps.gen_output.outputs.output_1 }}
output_2: ${{ steps.gen_output.outputs.output_2 }}
output_3: ${{ steps.gen_output.outputs.output_3 }}
strategy:
matrix:
version: [1, 2, 3]
steps:
- name: Generate output
id: gen_output
run: |
version="${{ matrix.version }}"
echo "output_${version}=${version}" >> "$GITHUB_OUTPUT"
job2:
runs-on: ubuntu-latest
needs: [job1]
steps:
# Will show
# {
# "output_1": "1",
# "output_2": "2",
# "output_3": "3"
# }
- run: echo '${{ toJSON(needs.job1.outputs) }}'
```

{% endraw %}

{% warning %}
Actions does not guarantee the order that matrix jobs will run in. Ensure that the output name is unique, otherwise the last matrix job that runs will override the output value.
{% endwarning %}
2 changes: 1 addition & 1 deletion data/reusables/two_fa/enable-totp-app-method.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

![Screenshot of the "Setup authenticator app" section of the 2FA settings. A link, labeled "setup key", is highlighted in orange.](/assets/images/help/2fa/ghes-3.8-and-higher-2fa-wizard-app-click-code.png)

1. The TOTP application saves your account on {% data variables.location.product_location %} and generates a new authentication code every few seconds. On {% data variables.product.product_name %}, type the code into the field under "Verify the code from the app".
1. The TOTP application saves your account on {% data variables.location.product_location %} and generates a new authentication code every few seconds. On {% data variables.product.product_name %}, type the code into the field under "Verify the code from the app."
6 changes: 6 additions & 0 deletions src/secret-scanning/data/public-docs-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default {
'isPrivateWithGhas',
'hasPushProtection',
'hasValidityCheck',
'isduplicate',
],
properties: {
provider: {
Expand Down Expand Up @@ -66,6 +67,11 @@ export default {
description: 'whether the secret has its validation status checked',
type: ['boolean', 'string'],
},
isduplicate: {
description:
'whether the token has more than one version, meaning there are more than one token descriptions with the same token key',
type: ['boolean'],
},
},
},
}
Loading