11
.github/workflows/content-lint-markdown.yml
vendored
11
.github/workflows/content-lint-markdown.yml
vendored
@@ -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"
|
||||
|
||||
5
.github/workflows/test-changed-content.yml
vendored
5
.github/workflows/test-changed-content.yml
vendored
@@ -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.
|
||||
|
||||
@@ -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#*\/}"
|
||||
|
||||
Reference in New Issue
Block a user