Commit 7d8f33d
ci: fix the nightly dependency-updates job, untrack outdated.json
Three bugs in one job.
1. `npm outdated --json` prints `{}` when nothing is outdated, and `{}`
is 3 bytes, so `[ -s outdated.json ]` was always true and
updates_available was effectively hardcoded to true.
2. The job wrote outdated.json into the working tree and then used
`git status --porcelain` over the whole tree to decide changes_made,
so its own scratch file influenced the answer.
3. Because create-pull-request had no add-paths, that scratch file got
swept into the commit. outdated.json is tracked in git today and this
workflow has committed it to main five times (#28, #29, #47, ...).
Scratch now goes to $RUNNER_TEMP, the {} case is handled, changes_made
is scoped to package.json and package-lock.json, and add-paths pins the
PR contents to those two files.
Also allow workflow_dispatch. Under `if: github.event_name ==
'schedule'` this job could not be tested without waiting for 2 AM UTC.
`npx --yes` because the log shows npm-check-updates being resolved via
an interactive install prompt, and the step is renamed to match what
`--target patch` actually does.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent e8bfe90 commit 7d8f33d
3 files changed
Lines changed: 25 additions & 255 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
111 | 116 | | |
112 | | - | |
| 117 | + | |
113 | 118 | | |
114 | 119 | | |
115 | | - | |
| 120 | + | |
| 121 | + | |
116 | 122 | | |
117 | 123 | | |
118 | | - | |
119 | | - | |
| 124 | + | |
120 | 125 | | |
121 | 126 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
125 | 131 | | |
126 | | - | |
| 132 | + | |
127 | 133 | | |
128 | | - | |
129 | 134 | | |
130 | 135 | | |
131 | 136 | | |
| |||
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
This file was deleted.
0 commit comments