Skip to content

Commit 686273d

Browse files
committed
fix(ci): run build-and-push when check-new-commits is skipped
check-new-commits runs only on the schedule, so push and workflow_dispatch runs skip it. build-and-push had no status function in its condition, so GitHub added an implicit success(), which counts that skipped ancestor and skips the job as well. Since #2185 dropped the always() guard that #1855 added, no push or manual run on main has built an image; only cron runs have. Use !cancelled() so the job runs whenever prepare succeeds and still stops when the run is cancelled.
1 parent 4de8fca commit 686273d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎.github/workflows/ci-build.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ jobs:
166166
build-and-push:
167167
name: "Build ${{ matrix.program }}"
168168
needs: [prepare]
169-
if: needs.prepare.result == 'success'
169+
# check-new-commits is skipped on push and dispatch. Without a status
170+
# function, the implicit success() sees that skip and skips this job too.
171+
if: ${{ !cancelled() && needs.prepare.result == 'success' }}
170172
runs-on: ubuntu-latest
171173
environment: prod
172174
permissions:

0 commit comments

Comments
 (0)