Skip to content

Commit 696041b

Browse files
nettleshclaude
andauthored
ci: build and scan the image only on pushes to main (#46)
The image job took about 7 of PR CI's 7.5 minutes, and newly disclosed upstream CVEs failed it on unrelated pull requests. It still runs on every push to main, where the release job waits for it, so release-please cuts no release until the image builds and passes its scan. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 701bf08 commit 696041b

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ jobs:
162162
# Fresh runners ship a default ~/.bashrc that the agent shell replaces
163163
mise --locked bootstrap --yes --force-dotfiles --skip packages,user
164164
165+
# The slow image build and scan gates releases rather than pull requests
165166
image:
166167
name: Image
167168
needs: check
169+
if: ${{ github.event_name == 'push' }}
168170
runs-on: ubuntu-26.04
169171
timeout-minutes: 20
170172
steps:

‎README.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,10 @@ checksums in `mise.lock`.
469469
points `HK_CONFIG_DIR` at the repository's `hk` directory so the shared hygiene
470470
checks run without deploying the dotfiles first.
471471

472-
[CI](.github/workflows/ci.yml) checks source files and Git history, verifies
473-
Linux and macOS bootstrap without optional environments, and builds and scans
474-
the dotfiles image. Pull requests do not upload build artifacts.
472+
[CI](.github/workflows/ci.yml) checks source files and Git history and verifies
473+
Linux and macOS bootstrap without optional environments. Pushes to `main` also
474+
build and scan the dotfiles image. Pull requests skip that slower job, so a
475+
`Dockerfile` change is first built after it merges.
475476

476477
Releases run after all CI jobs pass on `main`. The release job tests and scans
477478
its image before publishing it. Docker reuses the tested build's cache and

0 commit comments

Comments
 (0)