diff --git a/.github/workflows/validate-github-github-docs-urls.yml b/.github/workflows/validate-github-github-docs-urls.yml index c1df3d211661..edeb1ecdabbc 100644 --- a/.github/workflows/validate-github-github-docs-urls.yml +++ b/.github/workflows/validate-github-github-docs-urls.yml @@ -35,13 +35,6 @@ jobs: steps: - name: Check out repo's default branch uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - # Picking this number is a "best guess". If we make it too large, - # the checkout will take potentially unnecessariily long. - # This reduces the chance that tj-actions/changed-files has to - # fetch deeper history. But if it needs to, it will. - fetch-depth: 10 - - uses: ./.github/actions/node-npm-setup - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -108,23 +101,20 @@ jobs: # First, gather the URLs that were relevant - name: Get changed content/data files if: ${{ github.event_name == 'pull_request' }} - id: changed-files - uses: tj-actions/changed-files@40853de9f8ce2d6cfdc73c1b96f14e22ba44aec4 # v45.0.0 + id: changed_files + uses: ./.github/actions/get-changed-files with: - # No need to escape the file names because we make the output of - # tj-actions/changed-files be set as an environment variable. Not - # as a direct input to the line of bash that uses it. - safe_output: false files: | content/** + token: ${{ secrets.GITHUB_TOKEN }} - name: Generate PR comment - if: ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' }} + if: ${{ github.event_name == 'pull_request' && steps.changed_files.outputs.filtered_changed_files }} env: # Make it an environment variable so that its value doesn't need to be escaped. # See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable CHANGED_FILES: |- - ${{ steps.changed-files.outputs.all_changed_files }} + ${{ steps.changed_files.outputs.filtered_changed_files }} GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }} ISSUE_NUMBER: ${{ github.event.pull_request.number }} REPOSITORY: ${{ github.repository }} diff --git a/Dockerfile b/Dockerfile index f6cde6dc3128..91ae75e8bab0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ # --------------------------------------------------------------- # To update the sha: # https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble -FROM ghcr.io/github/gh-base-image/gh-base-noble:20250312-190108-g24a349a95 AS base +FROM ghcr.io/github/gh-base-image/gh-base-noble:20250319-193531-g83d4e6244 AS base # Install curl for Node install and determining the early access branch # Install git for cloning docs-early-access & translations repos diff --git a/assets/images/site/evergreens/boxwood.png b/assets/images/site/evergreens/boxwood.png new file mode 100644 index 000000000000..276739c7ce5a Binary files /dev/null and b/assets/images/site/evergreens/boxwood.png differ diff --git a/assets/images/site/evergreens/cedar.png b/assets/images/site/evergreens/cedar.png new file mode 100644 index 000000000000..dfd5c36c07ef Binary files /dev/null and b/assets/images/site/evergreens/cedar.png differ diff --git a/assets/images/site/evergreens/cypress.png b/assets/images/site/evergreens/cypress.png new file mode 100644 index 000000000000..05841a7cc6ce Binary files /dev/null and b/assets/images/site/evergreens/cypress.png differ diff --git a/assets/images/site/evergreens/fir.png b/assets/images/site/evergreens/fir.png new file mode 100644 index 000000000000..66ddfdf09ef8 Binary files /dev/null and b/assets/images/site/evergreens/fir.png differ diff --git a/assets/images/site/evergreens/hemlock.png b/assets/images/site/evergreens/hemlock.png new file mode 100644 index 000000000000..fcbab21e8aca Binary files /dev/null and b/assets/images/site/evergreens/hemlock.png differ diff --git a/assets/images/site/evergreens/holly.png b/assets/images/site/evergreens/holly.png new file mode 100644 index 000000000000..5c735394df9a Binary files /dev/null and b/assets/images/site/evergreens/holly.png differ diff --git a/assets/images/site/evergreens/juniper.png b/assets/images/site/evergreens/juniper.png new file mode 100644 index 000000000000..9956fa81553d Binary files /dev/null and b/assets/images/site/evergreens/juniper.png differ diff --git a/assets/images/site/evergreens/laurel.png b/assets/images/site/evergreens/laurel.png new file mode 100644 index 000000000000..4516472de094 Binary files /dev/null and b/assets/images/site/evergreens/laurel.png differ diff --git a/assets/images/site/evergreens/pine.png b/assets/images/site/evergreens/pine.png new file mode 100644 index 000000000000..78179a558d65 Binary files /dev/null and b/assets/images/site/evergreens/pine.png differ diff --git a/assets/images/site/evergreens/redwood.png b/assets/images/site/evergreens/redwood.png new file mode 100644 index 000000000000..08d75c7c9304 Binary files /dev/null and b/assets/images/site/evergreens/redwood.png differ diff --git a/assets/images/site/evergreens/sequoia.png b/assets/images/site/evergreens/sequoia.png new file mode 100644 index 000000000000..ad55d6879a4b Binary files /dev/null and b/assets/images/site/evergreens/sequoia.png differ diff --git a/assets/images/site/evergreens/spruce.png b/assets/images/site/evergreens/spruce.png new file mode 100644 index 000000000000..6bda9f17345a Binary files /dev/null and b/assets/images/site/evergreens/spruce.png differ diff --git a/src/assets/scripts/find-orphaned-assets.ts b/src/assets/scripts/find-orphaned-assets.ts index 14478e45b6d6..b609b96c4d47 100755 --- a/src/assets/scripts/find-orphaned-assets.ts +++ b/src/assets/scripts/find-orphaned-assets.ts @@ -30,6 +30,18 @@ const EXCEPTIONS = new Set([ 'assets/images/site/apple-touch-icon-60x60.png', 'assets/images/site/apple-touch-icon-72x72.png', 'assets/images/site/apple-touch-icon-76x76.png', + 'assets/images/site/evergreens/boxwood.png', + 'assets/images/site/evergreens/cedar.png', + 'assets/images/site/evergreens/cypress.png', + 'assets/images/site/evergreens/fir.png', + 'assets/images/site/evergreens/hemlock.png', + 'assets/images/site/evergreens/holly.png', + 'assets/images/site/evergreens/juniper.png', + 'assets/images/site/evergreens/laurel.png', + 'assets/images/site/evergreens/pine.png', + 'assets/images/site/evergreens/redwood.png', + 'assets/images/site/evergreens/sequoia.png', + 'assets/images/site/evergreens/spruce.png', ]) function isExceptionPath(imagePath: string) { diff --git a/src/frame/pages/app.tsx b/src/frame/pages/app.tsx index db76131ed915..28d9b38ea4e1 100644 --- a/src/frame/pages/app.tsx +++ b/src/frame/pages/app.tsx @@ -20,9 +20,38 @@ import { useTheme } from 'src/color-schemes/components/useTheme' type MyAppProps = AppProps & { isDotComAuthenticated: boolean languagesContext: LanguagesContextT + stagingName?: string } -const MyApp = ({ Component, pageProps, languagesContext }: MyAppProps) => { +const stagingNames = new Set([ + 'boxwood', + 'cedar', + 'cypress', + 'fir', + 'hemlock', + 'holly', + 'juniper', + 'laurel', + 'pine', + 'redwood', + 'sequoia', + 'spruce', +]) + +function getFaviconHref(stagingName?: string) { + /* The value in these "/cb-xxxxx" prefixes aren't important. They + just need to be present. They help the CDN cache the asset + for infinity. + Just remember, if you edit these images on disk, remember to + change these numbers + */ + if (stagingName) { + return `/assets/cb-345/images/site/evergreens/${stagingName}.png` + } + return '/assets/cb-345/images/site/favicon.png' +} + +const MyApp = ({ Component, pageProps, languagesContext, stagingName }: MyAppProps) => { const { theme } = useTheme() const router = useRouter() @@ -89,13 +118,7 @@ const MyApp = ({ Component, pageProps, languagesContext }: MyAppProps) => { GitHub Docs - {/* The value in these "/cb-xxxxx" prefixes aren't important. They - just need to be present. They help the CDN cache the asset - for infinity. - Just remember, if you edit these images on disk, remember to - change these numbers - */} - + @@ -157,9 +180,11 @@ MyApp.getInitialProps = async (appContext: AppContext) => { } } } + const stagingName = req.headers['x-ong-external-url']?.match(/staging-(\w+)\./)?.[1] return { ...appProps, languagesContext, + stagingName: stagingNames.has(stagingName) ? stagingName : undefined, } }