Skip to content

Commit 9af3df3

Browse files
authored
Merge pull request #46377 from github/repo-sync
Repo sync
2 parents 497671e + 8f64093 commit 9af3df3

195 files changed

Lines changed: 7006 additions & 806 deletions

File tree

Some content is hidden

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

‎.github/workflows/content-pipelines.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
steps:
3131
- name: Checkout docs-internal
3232
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
33+
with:
34+
# The git steps below authenticate with the PAT, so no token stays in .git/config.
35+
persist-credentials: false
3336

3437
- uses: ./.github/actions/node-npm-setup
3538

@@ -52,6 +55,10 @@ jobs:
5255
- name: Setup branch
5356
id: setup-branch
5457
env:
58+
# A PAT push triggers CI on the PR; GITHUB_TOKEN events do not start workflows.
59+
GIT_CONFIG_COUNT: 1
60+
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.DOCS_BOT_PAT_BASE }}@github.com/.insteadOf
61+
GIT_CONFIG_VALUE_0: https://github.com/
5562
UPDATE_BRANCH: ${{ steps.branch.outputs.update_branch }}
5663
PR_NUMBER: ${{ steps.check-pr.outputs.pr_number }}
5764
run: |
@@ -105,6 +112,10 @@ jobs:
105112
- name: Push changes
106113
if: steps.commit.outputs.has_changes == 'true'
107114
env:
115+
# A PAT push triggers CI on the PR; GITHUB_TOKEN events do not start workflows.
116+
GIT_CONFIG_COUNT: 1
117+
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.DOCS_BOT_PAT_BASE }}@github.com/.insteadOf
118+
GIT_CONFIG_VALUE_0: https://github.com/
108119
UPDATE_BRANCH: ${{ steps.branch.outputs.update_branch }}
109120
FORCE_PUSH: ${{ steps.setup-branch.outputs.force_push }}
110121
run: |

‎.github/workflows/index-autocomplete-search.yml‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
workflow_dispatch:
77
schedule:
88
- cron: '20 16 * * 1-5'
9+
# The GHES autocomplete index name uses the latest GHES release, so build the new index when releases change.
10+
push:
11+
branches:
12+
- main
13+
paths:
14+
- 'src/versions/lib/enterprise-server-releases.ts'
915
pull_request:
1016
paths:
1117
- .github/workflows/index-autocomplete-search.yml
@@ -15,6 +21,11 @@ on:
1521
permissions:
1622
contents: read
1723

24+
# Production runs share indexes, and updateAlias deletes other runs' in-progress indexes, so run them one at a time.
25+
concurrency:
26+
group: "${{ github.workflow }} @ ${{ github.event_name == 'pull_request' && github.head_ref || 'production' }}"
27+
cancel-in-progress: false
28+
1829
jobs:
1930
index-autocomplete-elasticsearch:
2031
if: ${{ github.repository == 'github/docs-internal' }}
@@ -45,12 +56,12 @@ jobs:
4556

4657
- uses: ./.github/actions/create-workflow-failure-issue
4758
id: create-failure-issue
48-
if: ${{ failure() && github.event_name == 'schedule' }}
59+
if: ${{ failure() && github.event_name != 'workflow_dispatch' && github.event_name != 'pull_request' }}
4960
with:
5061
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
5162

5263
- uses: ./.github/actions/slack-alert
53-
if: ${{ failure() && github.event_name == 'schedule' }}
64+
if: ${{ failure() && github.event_name != 'workflow_dispatch' && github.event_name != 'pull_request' }}
5465
with:
5566
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
5667
issue_url: ${{ steps.create-failure-issue.outputs.issue_url }}

‎.github/workflows/moda-allowed-ips.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,18 @@ jobs:
2222
env:
2323
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
2424
run: |
25+
set -o pipefail
26+
2527
echo "Getting a list of Fastly IP addresses...."
2628
ips=$( \
27-
curl -s https://api.fastly.com/public-ip-list \
29+
curl -fsS https://api.fastly.com/public-ip-list \
2830
| jq -r '.addresses | join(",")' \
2931
)
32+
# An empty value would clear the production allowlist.
33+
if [ -z "$ips" ]; then
34+
echo "::error::Fastly returned an empty IP list"
35+
exit 1
36+
fi
3037
echo "Got a list of Fastly IP addresses: $ips"
3138
3239
echo "Updating the list of allowed IPs in Moda config..."

‎.github/workflows/sync-codeql-cli.yml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
steps:
2929
- name: Checkout repository code
3030
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
31+
with:
32+
# 'Create pull request' pushes with the PAT, so no token stays in .git/config.
33+
persist-credentials: false
3134
- name: Checkout semmle-code repo
3235
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3336
with:
@@ -64,6 +67,10 @@ jobs:
6467
- name: Create pull request
6568
env:
6669
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
70+
# A PAT push triggers CI on the PR; GITHUB_TOKEN events do not start workflows.
71+
GIT_CONFIG_COUNT: 1
72+
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.DOCS_BOT_PAT_BASE }}@github.com/.insteadOf
73+
GIT_CONFIG_VALUE_0: https://github.com/
6774
run: |
6875
# Exit before branch creation so a no-op sync does not leave an orphan branch.
6976
changes=$(git diff --name-only | wc -l)
@@ -77,6 +84,7 @@ jobs:
7784
git config --global user.email "77750099+docs-bot@users.noreply.github.com"
7885
7986
branchname=codeql-cli-update-${{ steps.semmle-code.outputs.OPENAPI_COMMIT_SHA }}
87+
labels="codeql-cli-pipeline,skip FR board,ready-for-doc-review,workflow-generated"
8088
8189
git checkout -b $branchname
8290
git add .
@@ -89,6 +97,8 @@ jobs:
8997
existing_pr=$(gh pr list --repo github/docs-internal --head "$branchname" --json number --jq '.[0].number')
9098
if [[ -n "$existing_pr" ]]; then
9199
echo "Pull request #$existing_pr already exists for branch $branchname. Skipping PR creation."
100+
# The prior run may have failed before it applied labels.
101+
gh pr edit "$existing_pr" --repo github/docs-internal --add-label "$labels"
92102
exit 0
93103
fi
94104
@@ -101,7 +111,7 @@ jobs:
101111
102112
If CI does not pass or other problems arise, contact #technical-content on slack.' \
103113
--repo github/docs-internal \
104-
--label "codeql-cli-pipeline,skip FR board,ready-for-doc-review,workflow-generated"
114+
--label "$labels"
105115
106116
- uses: ./.github/actions/create-workflow-failure-issue
107117
id: create-failure-issue

‎.github/workflows/sync-sdk-docs.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ on:
2828
- 'src/workflows/sync-sdk-docs/**'
2929

3030
concurrency:
31-
group: sync-sdk-docs-${{ github.event_name }}
31+
group: sync-sdk-docs-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
3232
cancel-in-progress: true
3333

3434
permissions:
@@ -49,6 +49,9 @@ jobs:
4949
steps:
5050
- name: Checkout docs-internal
5151
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
52+
with:
53+
# 'Commit and push' authenticates with the PAT, so no token stays in .git/config.
54+
persist-credentials: false
5255

5356
# Publishing runs must start from the default branch because preserve-redirects.ts reads
5457
# live URLs from git HEAD. workflow_dispatch from another branch could write stale redirects.
@@ -199,8 +202,11 @@ jobs:
199202
git config user.name "github-actions[bot]"
200203
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
201204
205+
# A PAT triggers CI on the PR; GITHUB_TOKEN events do not start workflows.
206+
PAT_URL_REWRITE="url.https://x-access-token:${GH_TOKEN}@github.com/.insteadOf=https://github.com/"
207+
202208
# Fetch the sync branch if it exists so force-with-lease knows the remote state.
203-
git fetch origin "$SYNC_BRANCH" 2>/dev/null || true
209+
git -c "$PAT_URL_REWRITE" fetch origin "$SYNC_BRANCH" 2>/dev/null || true
204210
205211
git checkout -B "$SYNC_BRANCH"
206212
git commit -m "Sync Copilot SDK docs from copilot-sdk@${SDK_SHA::7}
@@ -209,7 +215,7 @@ jobs:
209215
210216
This commit was automatically generated by the sync-sdk-docs workflow."
211217
212-
git push --force-with-lease origin "$SYNC_BRANCH"
218+
git -c "$PAT_URL_REWRITE" push --force-with-lease origin "$SYNC_BRANCH"
213219
214220
- name: Create or update pull request
215221
if: >-

‎content/actions/how-tos/troubleshoot-workflows.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ A common cause can be using the `always()` [status check function](/actions/refe
136136

137137
For more information, see [AUTOTITLE](/actions/how-tos/write-workflows/choose-when-workflows-run/control-jobs-with-conditions) and [AUTOTITLE](/actions/how-tos/manage-workflow-runs/cancel-a-workflow-run).
138138

139+
If a run remains queued or in progress after cancellation attempts, it may be stuck in an abnormal state rather than continuing because of `always()`. Signs include no jobs being created, the UI displaying "Failed to cancel workflow", or the `cancel` or `force-cancel` REST API endpoints returning HTTP `500` or `409`.
140+
141+
Self-service cancellation, including force cancellation, may not clear a stuck or out-of-sync workflow run or check suite. If your repository uses concurrency, the stuck run can continue blocking later runs in the same concurrency group. In this situation, contact {% data variables.contact.contact_support %} for help clearing the run.
142+
139143
## Troubleshooting runners
140144

141145
### Defining runner labels

‎content/admin/data-residency/github-copilot-with-data-residency.md‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,9 @@ The models available for {% data variables.product.prodname_copilot_short %} var
5454

5555
* {% data variables.copilot.copilot_gpt_4o_mini %}
5656
* {% data variables.copilot.copilot_gpt_41 %}
57-
* {% data variables.copilot.copilot_gpt_5_mini %}
5857
* {% data variables.copilot.copilot_gpt_52 %}
5958
* {% data variables.copilot.copilot_gpt_53_codex %}
60-
* {% data variables.copilot.copilot_gpt_54 %}
61-
* {% data variables.copilot.copilot_gpt_54_mini %}
6259
* {% data variables.copilot.copilot_gpt_54_nano %}
63-
* {% data variables.copilot.copilot_gpt_55 %}
6460
* {% data variables.copilot.copilot_gpt_56_luna %}
6561
* {% data variables.copilot.copilot_gpt_56_sol %}
6662
* {% data variables.copilot.copilot_gpt_56_terra %}

‎content/code-security/how-tos/secure-at-scale/configure-organization-security/manage-usage-and-access/giving-org-access-private-registries.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ See [AUTOTITLE](/code-security/how-tos/secure-your-supply-chain/manage-your-depe
116116

117117
### Configuring OIDC authentication for a private registry
118118

119-
OIDC (OpenID Connect) authentication allows {% data variables.product.prodname_dependabot %} to use short-lived credentials from your cloud identity provider to access private registries, eliminating the need to store long-lived secrets. With OIDC, credentials are generated dynamically for each {% data variables.product.prodname_dependabot %} update job. You must configure a trust relationship between your cloud provider and {% data variables.product.github %} before {% data variables.product.prodname_dependabot %} can authenticate.
119+
OIDC (OpenID Connect) authentication allows {% data variables.product.prodname_dependabot %} and {% data variables.product.prodname_code_scanning %} default setup to use short-lived credentials from your cloud identity provider to access private registries. Each feature is limited to its supported registry types.
120+
121+
With OIDC, credentials are generated dynamically for update or analysis jobs, eliminating the need to store long-lived secrets. You must configure a trust relationship between your cloud provider and {% data variables.product.github %} before either feature can authenticate.
120122

121123
When you select **OIDC** as the authentication method for a private registry, choose one of the supported providers and fill in the required fields:
122124

@@ -136,7 +138,7 @@ For more information about how OIDC works, see [AUTOTITLE](/actions/concepts/sec
136138

137139
### Configuring an anonymous private registry
138140

139-
Some registries, such as internal mirrors, don't require authentication. You can add these registries at the organization level with the **Anonymous** authentication method so that {% data variables.product.prodname_dependabot %} can use them without a token, password, or OIDC configuration.
141+
Some registries, such as internal mirrors, don't require authentication. You can add these registries at the organization level with the **Anonymous** authentication method so that {% data variables.product.prodname_dependabot %} and {% data variables.product.prodname_code_scanning %} default setup can use them without a token, password, or OIDC configuration.
140142

141143
{% ifversion dependabot-egress-allowlist %}
142144
{% data variables.product.prodname_dependabot %} update jobs can only connect to hosts on an egress allowlist. Adding an anonymous registry allows {% data variables.product.prodname_dependabot %} to reach the registry's host for jobs in repositories that have access to the registry, without storing a secret or sending credentials. For more information, see [AUTOTITLE](/code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/resolve-a-blocked-host).

‎content/code-security/how-tos/secure-your-supply-chain/secure-your-dependencies/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ contentType: how-tos
1010
children:
1111
- /configure-dependabot-alerts
1212
- /configure-malware-alerts
13+
- /protecting-endpoints-with-package-firewall
1314
- /configure-security-updates
1415
- /configure-version-updates
1516
- /manage-innersource-advisories
@@ -21,4 +22,3 @@ children:
2122
- /use-dependency-submission-api
2223
- /verify-release-integrity
2324
---
24-

0 commit comments

Comments
 (0)