Unverified Commit cca20004 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update CI docs change diff check (#21558)

* Update CI docs change diff check

* Increse fetch depth for merge base detecting

* Update cancel branches config
parent e1fe28c8
...@@ -15,6 +15,9 @@ jobs: ...@@ -15,6 +15,9 @@ jobs:
docsChange: ${{ steps.docs-change.outputs.DOCS_CHANGE }} docsChange: ${{ steps.docs-change.outputs.DOCS_CHANGE }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
fetch-depth: 25
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- run: yarn install --frozen-lockfile --check-files - run: yarn install --frozen-lockfile --check-files
- run: node run-tests.js --timings --write-timings -g 1/1 - run: node run-tests.js --timings --write-timings -g 1/1
...@@ -136,6 +139,8 @@ jobs: ...@@ -136,6 +139,8 @@ jobs:
YARN_COMPRESSION_LEVEL: '0' YARN_COMPRESSION_LEVEL: '0'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
fetch-depth: 25
- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change') - run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change id: docs-change
...@@ -164,6 +169,8 @@ jobs: ...@@ -164,6 +169,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
fetch-depth: 25
- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change') - run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change id: docs-change
...@@ -187,6 +194,8 @@ jobs: ...@@ -187,6 +194,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
fetch-depth: 25
- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change') - run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change id: docs-change
......
name: Cancel name: Cancel
on: on:
pull_request_target: pull_request_target:
branches-ignore: branches:
# don't run cancel job for branches named canary until # don't run cancel job for branches named canary until
# it no longer cancels the main canary branches jobs # it no longer cancels the main canary branches jobs
- canary - '**'
- '!canary'
types: types:
- edited - edited
- synchronize - synchronize
......
...@@ -10,6 +10,9 @@ jobs: ...@@ -10,6 +10,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
fetch-depth: 25
- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change') - run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change id: docs-change
- uses: ./.github/actions/next-stats-action - uses: ./.github/actions/next-stats-action
......
...@@ -9,7 +9,7 @@ async function main() { ...@@ -9,7 +9,7 @@ async function main() {
await exec('git fetch origin canary') await exec('git fetch origin canary')
const { stdout: changedFilesOutput } = await exec( const { stdout: changedFilesOutput } = await exec(
'git diff origin/canary --name-only' 'git diff origin/canary... --name-only'
) )
const changedFiles = changedFilesOutput const changedFiles = changedFilesOutput
.split('\n') .split('\n')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment