1
0
mirror of synced 2026-01-22 18:03:38 -05:00

Merge pull request #31234 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2024-01-23 09:30:33 -08:00
committed by GitHub
3 changed files with 19 additions and 4 deletions

View File

@@ -32,10 +32,19 @@ jobs:
id: changed-files
uses: tj-actions/changed-files@716b1e13042866565e00e85fd4ec490e186c4a2f # v41.0.1
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/**
data/**
- name: Run content linter if changed content/data files
if: steps.changed-files.outputs.any_changed == 'true'
run: npm run lint-content -- --errors-only --paths ${{ steps.changed-files.outputs.all_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 }}
run: npm run lint-content -- --errors-only --paths "$CHANGED_FILES"

View File

@@ -47,6 +47,11 @@ jobs:
id: changed-files
uses: tj-actions/changed-files@716b1e13042866565e00e85fd4ec490e186c4a2f # v41.0.1
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.
# See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
safe_output: false
files: 'content/**'
# Necessary so we can know what the old name was when a
# content file was renamed.

View File

@@ -14,9 +14,10 @@
PREVIEW_ENV_LOCATION="eastus"
# If a CUSTOM_GITHUB_REPOSITORY variable was set, use that.
# Otherwise, use the default GITHUB_REPOSITORY value.
# (This allows us to call this script from another repo.)
# GITHUB_REPOSITORY is a default env variable and cannot be overwritten.
# Use CUSTOM_GITHUB_REPOSITORY to specify a repo owner/name
# other than the repo owner/name where this script was called from.
# If CUSTOM_GITHUB_REPOSITORY is not specified, fall back to GITHUB_REPOSITORY.
REPO_NAME_WITH_OWNER="${CUSTOM_GITHUB_REPOSITORY:-$GITHUB_REPOSITORY}"
REPO_NAME="${REPO_NAME_WITH_OWNER#*\/}"