Skip to content

Commit ef9b03a

Browse files
committed
Merge branch 'main' of github.com:github/docs-internal into check-links-improvement-redux
2 parents 624245d + 1f15ea4 commit ef9b03a

File tree

2,850 files changed

+48969
-9855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,850 files changed

+48969
-9855
lines changed

.github/allowed-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = [
2525
'pascalgn/automerge-action@c9bd182',
2626
'peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326',
2727
'peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd',
28-
'peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8',
28+
'peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43',
2929
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
3030
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
3131
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',

.github/workflows/remove-unused-assets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Remove script results file
3434
run: rm -rf ./results.md
3535
- name: Create pull request
36-
uses: peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8
36+
uses: peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43
3737
with:
3838
# need to use a token with repo and workflow scopes for this step
3939
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}

.github/workflows/repo-sync-stalls.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
const timeDelta = Date.now() - Date.parse(pr.created_at);
4141
const minutesOpen = timeDelta / 1000 / 60;
4242
43-
if (minutesOpen > 30) {
43+
if (minutesOpen > 180) {
4444
core.setFailed('Repo sync appears to be stalled')
4545
}
4646
})

.github/workflows/triage-unallowed-contributions.yml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11
name: Check unallowed file changes
22

33
on:
4-
push:
4+
pull_request_target:
5+
paths:
6+
- '.github/workflows/**'
7+
- '.github/CODEOWNERS'
8+
- 'translations/**'
9+
- 'assets/fonts/**'
10+
- 'data/graphql/**'
11+
- 'lib/graphql/**'
12+
- 'lib/redirects/**'
13+
- 'lib/rest/**'
14+
- 'lib/webhooks/**'
515

616
jobs:
717
triage:
818
if: github.repository == 'github/docs' && github.event.pull_request.user.login != 'Octomerger'
919
runs-on: ubuntu-latest
1020
steps:
1121
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
12-
- name: Get pull request number
13-
id: pull-number
14-
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
15-
with:
16-
github-token: ${{secrets.GITHUB_TOKEN}}
17-
result-encoding: string
18-
script: |
19-
const pulls = await github.repos.listPullRequestsAssociatedWithCommit({
20-
...context.repo,
21-
commit_sha: context.sha
22-
})
23-
24-
return pulls.data.map(pull => pull.number).shift()
2522
- name: Check for existing requested changes
2623
id: requested-change
2724
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
@@ -31,13 +28,19 @@ jobs:
3128
script: |
3229
const pullReviews = await github.pulls.listReviews({
3330
...context.repo,
34-
pull_number: ${{steps.pull-number.outputs.result}}
31+
pull_number: context.payload.number
3532
})
3633
37-
return pullReviews.data
34+
const botReviews = pullReviews.data
3835
.filter(review => review.user.login === 'github-actions[bot]')
3936
.sort((a, b) => new Date(b.submitted_at) - new Date(a.submitted_at))
4037
.shift()
38+
39+
if (botReviews) {
40+
console.log(`Pull request reviews authored by the github-action bot: ${botReviews}`)
41+
}
42+
return botReviews
43+
4144
- name: Get files changed
4245
uses: dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58
4346
id: filter
@@ -89,29 +92,31 @@ jobs:
8992
if (translationFiles.length > 0) {
9093
await github.issues.addLabels({
9194
...context.repo,
92-
issue_number: ${{steps.pull-number.outputs.result}},
95+
issue_number: context.payload.number,
9396
labels: ['localization']
9497
})
9598
reviewMessage += "\n\nIt looks like you've modified translated content. Unfortunately, we are not able to accept pull requests for translated content. Our translation process involves an integration with an external service at crowdin.com, where all translation activity happens. We hope to eventually open up the translation process to the open source community, but we're not there yet. See https://github.com/github/docs/blob/main/CONTRIBUTING.md#earth_asia-translations for more details."
9699
}
97100
98101
await github.pulls.createReview({
99102
...context.repo,
100-
pull_number: ${{steps.pull-number.outputs.result}},
103+
pull_number: context.payload.number,
101104
body: reviewMessage,
102105
event: 'REQUEST_CHANGES'
103106
})
104107
# When the most recent review was CHANGES_REQUESTED and the existing
105108
# PR no longer contains unallowed changes, dismiss the previous review
106109
- name: Dismiss pull request review
107-
if: ${{ steps.filter.outputs.notAllowed == 'false' && fromJson(steps.requested-change.outputs.result).state == 'CHANGES_REQUESTED' }}
110+
# Check that unallowed files aren't modified and that a
111+
# CHANGES_REQUESTED review already exists
112+
if: ${{ steps.filter.outputs.notAllowed == 'false' && steps.requested-change.outputs.result && fromJson(steps.requested-change.outputs.result).state == 'CHANGES_REQUESTED' }}
108113
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
109114
with:
110115
github-token: ${{secrets.GITHUB_TOKEN}}
111116
script: |
112117
await github.pulls.dismissReview({
113118
...context.repo,
114-
pull_number: ${{steps.pull-number.outputs.result}},
119+
pull_number: context.payload.number,
115120
review_id: ${{fromJson(steps.requested-change.outputs.result).id}},
116121
message: `✨Looks like you reverted all files we don't accept contributions for. 🙌 A member of the docs team will review your PR soon. 🚂`
117122
})

.github/workflows/update-graphql-files.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ env:
99
FREEZE: ${{ secrets.FREEZE }}
1010

1111
on:
12+
workflow_dispatch:
1213
schedule:
1314
- cron: '20 16 * * *' # run every day at 16:20 UTC / 8:20 PST
1415

@@ -36,15 +37,15 @@ jobs:
3637
- name: Run updater scripts
3738
env:
3839
# need to use a token from a user with access to github/github for this step
39-
GITHUB_TOKEN: ${{ secrets.ZEKE_PAT_WITH_REPO_AND_WORKFLOW_SCOPE_FOR_REPO_SYNC }}
40+
GITHUB_TOKEN: ${{ secrets.RACHMARI_REPO_WORKFLOW }}
4041
run: |
4142
script/graphql/update-files.js
4243
- name: Create pull request
4344
id: create-pull-request
44-
uses: peter-evans/create-pull-request@938e6aea6f8dbdaced2064e948cb806c77fe87b8
45+
uses: peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43
4546
with:
4647
# need to use a token with repo and workflow scopes for this step
47-
token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
48+
token: ${{ secrets.GITHUB_TOKEN }}
4849
commit-message: 'Action ran graphql script"update-files"'
4950
title: GraphQL schema update
5051
body:

Gemfile.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ GEM
1010

1111
PLATFORMS
1212
ruby
13+
x86_64-linux
1314

1415
DEPENDENCIES
1516
graphql (= 1.10.6)
1617
graphql-schema_comparator (~> 1.0.0)
1718

1819
BUNDLED WITH
19-
2.1.4
20+
2.2.1

app.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"name": "docs.github.com",
33
"env": {
44
"NODE_ENV": "production",
5-
"NPM_CONFIG_PRODUCTION": "true"
5+
"NPM_CONFIG_PRODUCTION": "true",
6+
"ENABLED_LANGUAGES": "en, de"
67
},
78
"buildpacks": [
9+
{ "url": "https://github.com/DataDog/heroku-buildpack-datadog.git#1.21" },
810
{ "url": "heroku/nodejs" }
911
],
1012
"formation": {
89.2 KB
Loading
52.5 KB
Loading
147 KB
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
7.38 KB
Loading

content/actions/creating-actions/metadata-syntax-for-github-actions.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ runs:
117117
{% endraw %}
118118

119119
#### `outputs.<output_id>.value`
120+
120121
**Required** The value that the output parameter will be mapped to. You can set this to a `string` or an expression with context. For example, you can use the `steps` context to set the `value` of an output to the output value of a step.
121122

122123
For more information on how to use context and expression syntax, see "[Context and expression syntax for {% data variables.product.prodname_actions %}](/actions/reference/context-and-expression-syntax-for-github-actions)".
@@ -205,7 +206,7 @@ For example, this `cleanup.js` will only run on Linux-based runners:
205206

206207
**Required** The run steps that you plan to run in this action.
207208

208-
##### `runs.steps.run`
209+
##### `runs.steps[*].run`
209210

210211
**Required** The command you want to run. This can be inline or a script in your action repository:
211212
```yaml
@@ -228,23 +229,23 @@ runs:
228229

229230
For more information, see "[`github context`](/actions/reference/context-and-expression-syntax-for-github-actions#github-context)".
230231

231-
##### `runs.steps.shell`
232+
##### `runs.steps[*].shell`
232233

233234
**Required** The shell where you want to run the command. You can use any of the shells listed [here](/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell).
234235

235-
##### `runs.steps.name`
236+
##### `runs.steps[*].name`
236237

237238
**Optional** The name of the composite run step.
238239

239-
##### `runs.steps.id`
240+
##### `runs.steps[*].id`
240241

241242
**Optional** A unique identifier for the step. You can use the `id` to reference the step in contexts. For more information, see "[Context and expression syntax for {% data variables.product.prodname_actions %}](/actions/reference/context-and-expression-syntax-for-github-actions)".
242243

243-
##### `runs.steps.env`
244+
##### `runs.steps[*].env`
244245

245246
**Optional** Sets a `map` of environment variables for only that step. If you want to modify the environment variable stored in the workflow, use {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "[email protected]" %}`echo "{name}={value}" >> $GITHUB_ENV`{% else %}`echo "::set-env name={name}::{value}"`{% endif %} in a composite run step.
246247

247-
##### `runs.steps.working-directory`
248+
##### `runs.steps[*].working-directory`
248249

249250
**Optional** Specifies the working directory where the command is run.
250251

content/actions/guides/about-continuous-integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Building and testing your code requires a server. You can build and test updates
2525

2626
### About continuous integration using {% data variables.product.prodname_actions %}
2727

28-
CI using {% data variables.product.prodname_actions %} offers workflows that can build the code in your repository and run your tests. Workflows can run on {% data variables.product.prodname_dotcom %}-hosted virtual machines, or on machines that you host yourself. For more information, see "[Virtual environments for {% data variables.product.prodname_dotcom %}-hosted runners](/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners)," and "[About self-hosted runners](/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners)."
28+
CI using {% data variables.product.prodname_actions %} offers workflows that can build the code in your repository and run your tests. Workflows can run on {% data variables.product.prodname_dotcom %}-hosted virtual machines, or on machines that you host yourself. For more information, see "[Virtual environments for {% data variables.product.prodname_dotcom %}-hosted runners](/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners)" and "[About self-hosted runners](/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners)."
2929

3030
You can configure your CI workflow to run when a {% data variables.product.product_name %} event occurs (for example, when new code is pushed to your repository), on a set schedule, or when an external event occurs using the repository dispatch webhook.
3131

content/actions/guides/building-and-testing-nodejs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ steps:
193193

194194
{% data reusables.github-actions.setup-node-intro %}
195195

196-
To authenticate to your private registry, you'll need to store your npm authentication token as a secret in your repository settings. For example, create a secret called `NPM_TOKEN`. For more information, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
196+
To authenticate to your private registry, you'll need to store your npm authentication token as a secret. For example, create a repository secret called `NPM_TOKEN`. For more information, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
197197

198-
In the example below, the secret `NPM_TOKEN` stores the npm authentication token. The `setup-node` action configures the *.npmrc* file to read the npm authentication token from the `NODE_AUTH_TOKEN` environment variable. When using the `setup-node` action to create an *.npmrc* file, you must set the `NPM_AUTH_TOKEN` environment variable with the secret that contains your npm authentication token.
198+
In the example below, the secret `NPM_TOKEN` stores the npm authentication token. The `setup-node` action configures the *.npmrc* file to read the npm authentication token from the `NODE_AUTH_TOKEN` environment variable. When using the `setup-node` action to create an *.npmrc* file, you must set the `NODE_AUTH_TOKEN` environment variable with the secret that contains your npm authentication token.
199199

200200
Before installing dependencies, use the `setup-node` action to create the *.npmrc* file. The action has two input parameters. The `node-version` parameter sets the Node.js version, and the `registry-url` parameter sets the default registry. If your package registry uses scopes, you must use the `scope` parameter. For more information, see [`npm-scope`](https://docs.npmjs.com/misc/scope).
201201

content/actions/guides/building-and-testing-powershell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ The `always()` function configures the job to continue processing even if there
214214

215215
### Publishing to PowerShell Gallery
216216

217-
You can configure your workflow to publish your PowerShell module to the PowerShell Gallery when your CI tests pass. You can use repository secrets to store any tokens or credentials needed to publish your package. For more information, see "[Creating and using encrypted secrets](/github/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
217+
You can configure your workflow to publish your PowerShell module to the PowerShell Gallery when your CI tests pass. You can use secrets to store any tokens or credentials needed to publish your package. For more information, see "[Creating and using encrypted secrets](/github/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
218218

219219
The following example creates a package and uses `Publish-Module` to publish it to the PowerShell Gallery:
220220

content/actions/guides/building-and-testing-python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ jobs:
391391

392392
You can configure your workflow to publish your Python package to any package registry you'd like when your CI tests pass.
393393

394-
You can store any access tokens or credentials needed to publish your package using repository secrets. The following example creates and publishes a package to PyPI using `twine` and `dist`. For more information, see "[Creating and using encrypted secrets](/github/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
394+
You can store any access tokens or credentials needed to publish your package using secrets. The following example creates and publishes a package to PyPI using `twine` and `dist`. For more information, see "[Creating and using encrypted secrets](/github/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
395395

396396
{% raw %}
397397
```yaml

content/actions/guides/publishing-docker-images.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To push to Docker Hub, you will need to have a Docker Hub account, and have a Do
5050

5151
The `build-push-action` options required for Docker Hub are:
5252

53-
* `username` and `password`: This is your Docker Hub username and password. We recommend storing your Docker Hub username and password as encrypted secrets in your {% data variables.product.prodname_dotcom %} repository so they aren't exposed in your workflow file. For more information, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
53+
* `username` and `password`: This is your Docker Hub username and password. We recommend storing your Docker Hub username and password as secrets so they aren't exposed in your workflow file. For more information, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
5454
* `repository`: Your Docker Hub repository in the format `DOCKER-HUB-NAMESPACE/DOCKER-HUB-REPOSITORY`.
5555

5656
{% raw %}

content/actions/guides/publishing-nodejs-packages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ If you add steps in your workflow to configure the `publishConfig` fields in you
4444

4545
Each time you create a new release, you can trigger a workflow to publish your package. The workflow in the example below runs when the `release` event triggers with type `created`. The workflow publishes the package to the npm registry if CI tests pass.
4646

47-
To perform authenticated operations against the npm registry in your workflow, you'll need to store your npm authentication token as a secret in your repository settings. For example, create a secret called `NPM_TOKEN`. For more information, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
47+
To perform authenticated operations against the npm registry in your workflow, you'll need to store your npm authentication token as a secret. For example, create a repository secret called `NPM_TOKEN`. For more information, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
4848

4949
By default, npm uses the `name` field of the *package.json* file to determine the npm registry. When publishing to a global namespace, you only need to include the package name. For example, you would publish a package named `npm-hello-world-test` to the `https://www.npmjs.com/package/npm-hello-world-test`.
5050

content/actions/index.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,15 @@ featuredLinks:
2525
- /actions/reference/workflow-commands-for-github-actions
2626
- /actions/reference/environment-variables
2727
changelog:
28+
- title: Workflow visualization
29+
date: '2020-12-08'
30+
href: https://github.blog/changelog/2020-12-08-github-actions-workflow-visualization/
2831
- title: Removing set-env and add-path commands on November 16
2932
date: '2020-11-09'
3033
href: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
3134
- title: Ubuntu-latest workflows will use Ubuntu-20.04
3235
date: '2020-10-29'
3336
href: https://github.blog/changelog/2020-10-29-github-actions-ubuntu-latest-workflows-will-use-ubuntu-20-04
34-
- title: MacOS Big Sur Preview
35-
date: '2020-10-29'
36-
href: https://github.blog/changelog/2020-10-29-github-actions-macos-big-sur-preview
37-
- title: Self-Hosted Runner Group Access Changes
38-
date: '2020-10-16'
39-
href: https://github.blog/changelog/2020-10-16-github-actions-self-hosted-runner-group-access-changes/
4037

4138
product_video: https://www.youtube-nocookie.com/embed/cP0I9w2coGU
4239

content/actions/learn-github-actions/finding-and-customizing-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ steps:
7979
8080
#### Using branches
8181
82-
Referring to a specific branch means that the action will always use include the latest updates on the target branch, but can create problems if those updates include breaking changes. This example targets a branch named `@main`:
82+
Referring to a specific branch means that the action will always use the latest updates on the target branch, but can create problems if those updates include breaking changes. This example targets a branch named `@main`:
8383

8484
```yaml
8585
steps:

0 commit comments

Comments
 (0)