Skip to content

Commit

Permalink
Merge branch 'github:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Wesley Middleton authored Dec 16, 2024
2 parents e6679d9 + 7c3c8e7 commit 2718c22
Show file tree
Hide file tree
Showing 1,782 changed files with 20,418 additions and 13,689 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"cSpell.language": ",en"
"cSpell.language": ",en",
"git.autofetch": true
},
// Visual Studio Code extensions which help authoring for docs.github.com.
"extensions": [
Expand Down Expand Up @@ -57,7 +58,7 @@
},

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm ci",
"postCreateCommand": "npm ci && npm start",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
Expand Down
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
version: 2
registries:
ghcr: # Define access for a private registry
type: docker-registry
url: ghcr.io
username: PAT
password: ${{secrets.CONTAINER_BUILDER_TOKEN}}
updates:
- package-ecosystem: npm
directory: '/'
Expand All @@ -23,11 +29,18 @@ updates:
- dependency-name: '*'
update-types:
['version-update:semver-patch', 'version-update:semver-minor']
- dependency-name: 'github/internal-actions'

- package-ecosystem: 'docker'
registries:
- ghcr
directory: '/'
schedule:
interval: weekly
day: thursday
groups:
baseImages:
patterns:
- '*'
ignore:
- dependency-name: 'node'
1 change: 1 addition & 0 deletions .github/workflows/azure-preview-env-deploy-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ jobs:
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
with:
context: .
file: Dockerfile.azure
push: true
target: preview
tags: ${{ env.DOCKER_IMAGE }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/azure-preview-env-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ jobs:
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
with:
context: .
file: Dockerfile.azure
push: true
target: ${{ steps.with-translations.outputs.result == 'true' && 'production' || 'preview' }}
tags: ${{ env.DOCKER_IMAGE }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/azure-prod-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
with:
context: .
file: Dockerfile.azure
push: true
target: production
tags: ${{ env.DOCKER_IMAGE }}, ${{ env.DOCKER_IMAGE_CACHE_REF }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/azure-staging-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
with:
context: .
file: Dockerfile.azure
push: true
target: production
tags: ${{ env.DOCKER_IMAGE }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main-preview-docker-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755
with:
context: .
file: Dockerfile.azure
push: true
target: preview
tags: ${{ env.DOCKER_IMAGE_CACHE_REF }}
Expand Down
101 changes: 101 additions & 0 deletions .github/workflows/moda-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: docs-internal Moda CI

# More info on CI actions setup can be found here:
# https://github.com/github/ops/blob/master/docs/playbooks/build-systems/moving-moda-apps-from-bp-to-actions.md

on:
workflow_dispatch:
push:
branches-ignore:
- 'gh-readonly-queue/**'
merge_group:
types: [checks_requested]

jobs:
##########################
# Generate Vault keys
##########################
set-vault-keys:
runs-on: ubuntu-latest
outputs:
modified_vault_keys: ${{ steps.modify_vault_keys.outputs.modified }}
steps:
- name: Set vault-keys output
id: modify_vault_keys
run: |
if [ -z "${{ vars.VAULT_KEYS }}" ]; then
# We want to add the DOCS_BOT_PAT_READPUBLICKEY to the list of keys
# so that builds fetch the secret from the docs-internal vault
# where --environment is "ci"
echo "modified=DOCS_BOT_PAT_READPUBLICKEY" >> $GITHUB_OUTPUT
else
echo "modified=${{ vars.VAULT_KEYS }},DOCS_BOT_PAT_READPUBLICKEY" >> $GITHUB_OUTPUT
fi
#############
# Moda jobs
#############
moda-config-bundle:
if: ${{ github.repository == 'github/docs-internal' }}
name: ${{ matrix.ci_job.job }}
needs: set-vault-keys
strategy:
fail-fast: false
matrix:
ci_job: [{ 'job': 'docs-internal-moda-config-bundle' }]
uses: github/internal-actions/.github/workflows/moda.yml@main
with:
ci-formatted-job-name: ${{ matrix.ci_job.job }}
vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }}
secrets:
dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }}
datadog-api-key: ${{ secrets.DATADOG_API_KEY }}

#############
# Docker Image jobs
#############
docker-image:
if: ${{ github.repository == 'github/docs-internal' }}
name: ${{ matrix.ci_job.job }}
needs: set-vault-keys
strategy:
fail-fast: false
matrix:
ci_job: [{ 'job': 'docs-internal-docker-image' }]
uses: github/internal-actions/.github/workflows/kube.yml@main
with:
ci-formatted-job-name: ${{ matrix.ci_job.job }}
vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }}
# Passes 'DOCS_BOT_PAT_READPUBLICKEY' secret from Vault to docker as --secret id=DOCS_BOT_PAT_READPUBLICKEY,src=<PAT value>
docker-build-env-secrets: 'DOCS_BOT_PAT_READPUBLICKEY'
secrets:
dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }}
datadog-api-key: ${{ secrets.DATADOG_API_KEY }}

#############
# Docker Security jobs
#############
docker-security:
if: ${{ github.repository == 'github/docs-internal' }}
name: ${{ matrix.ci_job.job }}
needs: set-vault-keys
strategy:
fail-fast: false
matrix:
ci_job: [{ 'job': 'docs-internal-docker-security' }]
uses: github/internal-actions/.github/workflows/docker_security.yml@main
with:
ci-formatted-job-name: ${{ matrix.ci_job.job }}
vault-keys: ${{ needs.set-vault-keys.outputs.modified_vault_keys }}
# Passes 'DOCS_BOT_PAT_READPUBLICKEY' secret from Vault to docker as --secret id=DOCS_BOT_PAT_READPUBLICKEY,src=<PAT value>
docker-build-env-secrets: 'DOCS_BOT_PAT_READPUBLICKEY'
secrets:
dx-bot-token: ${{ secrets.INTERNAL_ACTIONS_DX_BOT_ACCOUNT_TOKEN }}
datadog-api-key: ${{ secrets.DATADOG_API_KEY }}

permissions:
actions: read
checks: read
contents: read
statuses: read
id-token: write
Loading

0 comments on commit 2718c22

Please sign in to comment.