Commit a9086ed
authored
ci: Only run Check lockfile when package.json or yarn.lock changes (#21077)
## Summary
Gates the `job_check_lockfile` job in `build.yml` on whether
`package.json` (any of them) or `yarn.lock` actually changed. PRs that
don't touch dependencies skip it.
## How
Adds a `deps` filter to the existing `dorny/paths-filter` step in
`ci-metadata.yml` (matching `**/package.json` + `yarn.lock`), exposes it
as a new `changed_deps` output, and adds an `if:` condition to
`job_check_lockfile`:
```yaml
if: |
needs.job_get_metadata.outputs.changed_deps == 'true' ||
needs.job_get_metadata.outputs.is_base_branch == 'true' ||
needs.job_get_metadata.outputs.is_release == 'true'
```
Pushes to base branches (`develop` / `v9` / `v8`) and release branches
still run the check unconditionally — same safety pattern as
`job_build`, so the lockfile is always verified end-to-end on those.1 parent f53c493 commit a9086ed
2 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
343 | 347 | | |
344 | 348 | | |
345 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
| |||
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
| 87 | + | |
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
| |||
0 commit comments