Commit graph

26 commits

Author SHA1 Message Date
Niels Göttsch
1ea007d330 ci: point deploy pipeline at moby/brewlog after repo move
Some checks failed
Build & Publish / Check (push) Successful in 2m24s
Build & Publish / Build & Publish (push) Failing after 3s
The repo moved from the uberbau owner to moby on the zo forge. Update
the image registry path and Kaniko git context accordingly.
2026-07-17 09:52:06 +02:00
Niels Göttsch
2e55c72522 ci: grant the job token packages:write for the registry push
Some checks failed
Build & Publish / Check (push) Successful in 7m40s
Build & Publish / Build & Publish (push) Failing after 4s
Kaniko's up-front push-permission check 401'd (reqPackageAccess): the Forgejo
auto GITHUB_TOKEN has no package-write scope by default. Declare
`permissions: {contents: read, packages: write}` so the token can push to the
forge container registry (git clone still needs contents:read).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 18:09:32 +02:00
Niels Göttsch
423ddc7870 ci: build image daemonless with Kaniko (no Docker)
Some checks failed
Build & Publish / Check (push) Successful in 2m15s
Build & Publish / Build & Publish (push) Failing after 9s
Replace the docker buildx / build-push-action build job with Kaniko running as
the job container: it builds the Dockerfile from the git context and pushes to
the forge registry, with no Docker daemon, no buildx, and no privileged DinD.

Kaniko cannot handle BuildKit `RUN --mount=type=cache`, so drop the two cache
mounts on the cargo build layer (plain `cargo build` now). Document the pipeline
and this gotcha (plus the node20-only runner and full-github-URL action rules) in
the README so it isn't reintroduced.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 17:17:09 +02:00
Niels Göttsch
168b674efe ci: source build-job actions from github.com, not the forge mirror
Some checks failed
Build & Publish / Check (push) Successful in 2m12s
Build & Publish / Build & Publish (push) Failing after 13m37s
The build job aborted during action preparation while cloning the docker/*
actions from code.forgejo.org (the checkout clone already warned "some refs
were not updated"). The check job proved that full github.com `uses:` URLs
clone reliably on this runner (mise-action@v2 worked), so pull checkout and the
docker actions from github.com directly. All are node20, which the runner
supports.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 16:38:16 +02:00
Niels Göttsch
e6555bd873 ci: install only Rust in the check job, drop sudo
Some checks failed
Build & Publish / Check (push) Successful in 7m36s
Build & Publish / Build & Publish (push) Failing after 13m36s
The check job failed inside mise: mise.toml pulls the full dev toolchain
(tailwind, cargo-watch, flyctl, shellcheck, mvdan/sh, ...) and resolves most of
it via api.github.com, which 401s on the runner (no github.com token) ->
"Failed to install tools" -> exit 1.

CI only needs Rust for fmt/clippy/test, so restrict mise to `install_args: rust`
(rust resolves through rustup, no GitHub API). Also drop `sudo` (the runner
image runs as root and has none) and the redundant `rustup component add`
(mise installs rustfmt/clippy from mise.toml). Keep mold — the .cargo linker
flag requires it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 16:02:53 +02:00
Niels Göttsch
d904689b38 ci: pin actions to the node20 generation for the forge runner
Some checks failed
Build & Publish / Check (push) Failing after 3m28s
Build & Publish / Build & Publish (push) Has been skipped
The forge's forgejo-runner (v6.3.1) only supports node runtimes up to node20,
but resolves bare `uses:` from code.forgejo.org where checkout@v6 (and the
other @v5/v6/v7 actions) declare `runs.using: node24` -> "must be one of
[... node20 ...], got node24" -> job failed before any step ran.

- checkout@v6->v4, cache@v5->v4, docker/{setup-buildx@v4->v3, login@v4->v3,
  build-push@v7->v6}: all node20.
- jdx/mise-action isn't mirrored on code.forgejo.org; reference it by full
  github URL, pinned to @v2 (node20).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 15:55:22 +02:00
Niels Göttsch
97b1d580e3 ci: repair build pipeline for the zo forge fork
Some checks failed
Build & Publish / Check (push) Failing after 16s
Build & Publish / Build & Publish (push) Has been skipped
The workflows were still the upstream GitHub ones and never ran here:
Deploy triggered on `main` (this fork's branch is `dev`), pushed to
`ghcr.io/jnsgruk/brewlog` (unreachable from this forge), and deployed to
jnsgruk's Fly.io.

- Deploy → build on push to `dev`, publish to this forge's own registry
  (git.ziemlichoptimal.de/uberbau/brewlog:{sha,dev}) via the auto GITHUB_TOKEN.
- Drop the Fly.io deploy step and the dead version-extract step; the moby
  homelab deploys the image via Flux GitOps, not from this pipeline.
- Retarget PR CI (push.yml) from `main` to `dev`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 15:50:58 +02:00
Jon Seager
8b49d3fbfe ci: bump Docker actions to latest major versions 2026-05-22 14:59:51 +00:00
Jon Seager
6766aa16f2 ci: bump jdx/mise-action from v2 to v4 2026-05-22 13:18:31 +00:00
Jon Seager
616876e73f fix(ci): Install mold linker and rustfmt in deploy workflow
The Deploy workflow on main failed because .cargo/config.toml requires
the mold linker, but deploy.yml only installed lld. The earlier fix
commit only updated push.yml, missing deploy.yml.
2026-05-22 13:05:51 +00:00
Jon Seager
46b0cb67ef fix(ci): Install mold linker and rustfmt component for CI
Add mold to system deps (needed by .cargo/config.toml linker setting)
and explicitly install rustfmt/clippy components since mise-action
doesn't always install Rust components.
2026-05-22 12:51:34 +00:00
Jon Seager
74e3b600fc chore: Switch e2e tests to Chrome for Testing via mise
Replace snap-installed Chromium/chromedriver with Chrome for Testing
installed via npx @puppeteer/browsers. Binaries live in
$MISE_DATA_DIR/chrome-for-testing/ with version-agnostic path lookup.

Add install-e2e mise task and required apt packages to README and CI.
2026-05-22 12:03:03 +01:00
Jon Seager
527358b695 chore: migrate from Nix to mise for dev environment management
Replace Nix flake with mise for toolchain management, treefmt for
formatting, prek for pre-commit hooks, and a Dockerfile for container
builds. Update CI workflows to use jdx/mise-action instead of Nix.

Add system dependency instructions to README.md and CLAUDE.md.
2026-05-22 12:03:03 +01:00
Jon Seager
edffb1679d
chore: update dependencies (#15)
* build(deps): bump actions/cache from 4 to 5

Bump the actions-deps group.

* build(deps): bump cargo-deps group (anyhow, chrono, clap, uuid, tempfile)

- anyhow 1.0.101 → 1.0.102
- chrono 0.4.43 → 0.4.44
- clap 4.5.57 → 4.5.60
- uuid 1.20.0 → 1.21.0
- tempfile 3.24.0 → 3.25.0

* build(deps): bump sqlx from 0.7.4 to 0.8.6

* build(deps): bump rand from 0.8.5 to 0.9.2

Migrate API changes:
- Replace OsRng.fill_bytes() with rand::rng().fill_bytes()
- Replace rand::thread_rng() with rand::rng()

* build(deps): bump thiserror from 1.0.69 to 2.0.18
2026-03-05 11:03:55 +00:00
Jon Seager
02235426c4
ci: speed up pipeline with cargo caching and merged jobs
Merge separate lint and test jobs into a single check job so clippy's
compilation artifacts are reused by tests. Add actions/cache for the
Cargo target directory and registry to enable incremental builds across
runs. Drop unnecessary fetch-depth: 0 from CI jobs.
2026-02-15 11:29:45 +00:00
Jon Seager
034630ade0
ci: add e2e browser test job to GitHub Actions 2026-02-10 10:45:12 +00:00
Jon Seager
8e72961f1a
ci(deploy): push latest tag to GHCR alongside commit SHA tag 2026-02-09 17:23:58 +00:00
Jon Seager
251e4aebb5
fix(ci): match docker tag to Cargo.toml version in deploy workflow
The container image is tagged with the package version from flake.nix,
not the git short hash. Read the version from Cargo.toml so the
docker tag command references the correct source image.
2026-02-06 20:16:31 +00:00
Jon Seager
2fff8e8124
ci: better CI job naming 2026-02-06 19:03:07 +00:00
Jon Seager
8a669f70d2
ci: add linting to CI 2026-02-06 19:01:28 +00:00
Jon Seager
6431d97afa
ci: remove push trigger from CI workflow
Only run CI on pull requests to main, not on direct pushes.
2026-02-06 18:58:41 +00:00
Jon Seager
4ba21269ed
ci: build the right container 2026-02-06 18:24:23 +00:00
Jon Seager
a3cf7970d1
ci: split CI and deploy into separate workflows
Move test running to a dedicated push.yml workflow that triggers on both
push and PR, and restrict deploy.yml to push-to-main only.
2026-02-06 18:08:18 +00:00
Jon Seager
1bcadf1d3e
ci: don't build twice in the test phase 2026-02-06 17:57:47 +00:00
Jon Seager
d35e1792da
ci: update to latest github checkout action 2026-02-06 17:35:26 +00:00
Jon Seager
90d4b5eb74
ci: initialise ci configuration 2026-02-06 17:17:02 +00:00