Skip to content

Commit 3549368

Browse files
authored
Restore content linter workflow (#54896)
1 parent 971ff91 commit 3549368

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

.github/workflows/content-lint-markdown.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,40 +25,37 @@ jobs:
2525
- name: Check out repo
2626
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2727
with:
28-
# Picking this number is a "best guess". If we make it too large,
29-
# the checkout will take potentially unnecessariily long.
30-
# This reduces the chance that tj-actions/changed-files has to
31-
# fetch deeper history. But if it needs to, it will.
3228
fetch-depth: 10
3329

3430
- name: Set up Node and dependencies
3531
uses: ./.github/actions/node-npm-setup
3632

3733
- name: Get changed content/data files
38-
id: changed-files
34+
id: changed_files
3935
uses: ./.github/actions/get-changed-files
4036
with:
4137
files: |
4238
content/**
4339
data/**
40+
token: ${{ secrets.GITHUB_TOKEN }}
4441

4542
- name: Print content linter annotations if changed content/data files
46-
if: steps.changed-files.outputs.filtered_changed_files
43+
if: steps.changed_files.outputs.filtered_changed_files
4744
env:
4845
# Make it an environment variable so that its value doesn't need to be escaped.
4946
# See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
5047
CHANGED_FILES: |-
51-
${{ steps.changed-files.outputs.filtered_changed_files }}
48+
${{ steps.changed_files.outputs.filtered_changed_files }}
5249
# If there are errors, using `--print-annotations` will make it
5350
# so it does *not* exit non-zero.
5451
# This is so that all warnings and errors are printed.
5552
run: npm run lint-content -- --print-annotations --paths $CHANGED_FILES
5653

5754
- name: Run content linter if changed content/data files
58-
if: steps.changed-files.outputs.any_changed == 'true'
55+
if: steps.changed_files.outputs.any_changed == 'true'
5956
env:
6057
# Make it an environment variable so that its value doesn't need to be escaped.
6158
# See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
6259
CHANGED_FILES: |-
63-
${{ steps.changed-files.outputs.filtered_changed_files }}
60+
${{ steps.changed_files.outputs.filtered_changed_files }}
6461
run: npm run lint-content -- --errors-only --paths $CHANGED_FILES

0 commit comments

Comments
 (0)