Run changed-files before cloning github/github (#49916)
This commit is contained in:
@@ -34,6 +34,12 @@ 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
|
||||
|
||||
@@ -100,6 +106,7 @@ jobs:
|
||||
# workaround for the time being.
|
||||
# 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@77af4bed286740ef1a6387dc4e4e4dec39f96054 # v43.0.0
|
||||
with:
|
||||
@@ -109,6 +116,7 @@ jobs:
|
||||
safe_output: false
|
||||
files: |
|
||||
content/**
|
||||
|
||||
- name: Generate PR comment
|
||||
if: ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' }}
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user