ci: Skip build_docs more often (#33398)
Don't run `build_docs` when the only change is: `.github/{workflows,ISSUE_TEMPLATE}/**`. Example [extra run](https://github.com/zed-industries/zed/actions/runs/15883155767). Release Notes: - N/A
This commit is contained in:
parent
4516b099e7
commit
294147f473
1 changed files with 9 additions and 1 deletions
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
@ -29,6 +29,7 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
run_tests: ${{ steps.filter.outputs.run_tests }}
|
run_tests: ${{ steps.filter.outputs.run_tests }}
|
||||||
run_license: ${{ steps.filter.outputs.run_license }}
|
run_license: ${{ steps.filter.outputs.run_license }}
|
||||||
|
run_docs: ${{ steps.filter.outputs.run_docs }}
|
||||||
runs-on:
|
runs-on:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -58,6 +59,11 @@ jobs:
|
||||||
else
|
else
|
||||||
echo "run_tests=false" >> $GITHUB_OUTPUT
|
echo "run_tests=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
if [[ $(git diff --name-only $COMPARE_REV ${{ github.sha }} | grep '^docs/') ]]; then
|
||||||
|
echo "run_docs=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "run_docs=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
if [[ $(git diff --name-only $COMPARE_REV ${{ github.sha }} | grep '^Cargo.lock') ]]; then
|
if [[ $(git diff --name-only $COMPARE_REV ${{ github.sha }} | grep '^Cargo.lock') ]]; then
|
||||||
echo "run_license=true" >> $GITHUB_OUTPUT
|
echo "run_license=true" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
|
@ -198,7 +204,9 @@ jobs:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
name: Check docs
|
name: Check docs
|
||||||
needs: [job_spec]
|
needs: [job_spec]
|
||||||
if: github.repository_owner == 'zed-industries'
|
if: |
|
||||||
|
github.repository_owner == 'zed-industries' &&
|
||||||
|
(needs.job_spec.outputs.run_tests == 'true' || needs.job_spec.outputs.run_docs == 'true')
|
||||||
runs-on:
|
runs-on:
|
||||||
- buildjet-8vcpu-ubuntu-2204
|
- buildjet-8vcpu-ubuntu-2204
|
||||||
steps:
|
steps:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue