Commit Graph
100 Commits
Author SHA1 Message Date
ThePhaseless 221f27acca fix(ci): hoist ARG VERSION to final stage to stop cache busting
Root cause of remaining cache misses: the base stage declared
ARG VERSION, and the build job passed VERSION=${{ github.sha }}.
Since VERSION changes every commit, every base/app layer cache key
changed with it — so layers rebuilt every run regardless of scope.

Additionally the test job passed no build-args while the build job
passed GITHUB_BUILD=true + VERSION, so test's cached base/app layers
had different keys from build's — cross-job reuse never hit either.

Fix:
- Dockerfile: move ARG VERSION / ENV VERSION from base to the final
  runtime stage (FROM app). VERSION is only read at runtime by
  src.consts via Pydantic settings; base/app layers don't use it.
  base/app now cache without per-commit VERSION variation.
- workflow: pass --build-arg GITHUB_BUILD=true in the test step so
  test and build share identical base/app cache keys (cross-job reuse).

VERSION is intentionally NOT passed to the test job: the test stage
(FROM app AS test) doesn't read VERSION, and omitting it keeps the
base/app cache keys identical between test and build.
2026-08-09 21:17:13 +02:00
ThePhaseless 1801eaa40c fix(ci): scope push trigger to main to avoid duplicate runs
push: branches: ["*"] matched feature branches, so every push to a
branch with an open PR fired both a 'push' and a 'pull_request' event.
Their concurrency groups differ (refs/heads/<branch> vs refs/pull/<n>/merge),
so cancel-in-progress could not dedup them — the full multi-arch build
ran twice on each push, doubling CI minutes.

Scope push to branches: ["main"]; pull_request remains the validator for
feature branches. Tag pushes (v*.*.*), schedule, and workflow_dispatch
are under separate filters and are unaffected.
2026-08-09 19:58:48 +02:00
ThePhaseless bc529e5915 fix(ci): use slice-free gha cache scopes for cross-job reuse
- test job: scope x64 -> amd64 to match build matrix amd64 leg
- build job: scope ${{ matrix.platform }} -> ${{ steps.vars.outputs.SURFIX }}
  (yields amd64/arm64), avoiding the gha backend's / path-separator
  bug that mangled scope=linux/arm64 and broke arm64 cache reuse

test (amd64) and build-amd64 now share scope=amd64 so build reuses
the app/base layers the test job cached earlier in the same run.
build-arm64 gets a working scope=arm64 that persists across runs.
2026-08-09 19:45:44 +02:00
ThePhaseless 1c9093f218 fix(ci): extract first image tag by line, not space
metadata-action emits tags newline-separated, so FIRST_TAG=${TAGS%% *}
kept the entire multi-line value and expanded to 4 args on tag releases,
making `imagetools inspect` fail before the manifest could be signed.
Split on the first line instead.
2026-08-09 19:25:09 +02:00
ThePhaseless 25194c3bca fix(ci): sign docker image by digest instead of tag 2026-08-08 02:20:35 +02:00
renovate[bot] d9c56163cc chore(deps): update sigstore/cosign-installer action to v4.1.2 (#350)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-04 05:24:24 -07:00
renovate[bot] e653c23998 chore(deps): update actions/checkout action to v7 (#363)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-04 05:24:21 -07:00
renovate[bot] 132db521ec chore(deps): update actions/github-script action to v9 (#341)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-04 19:15:00 +02:00
renovate[bot] 7b5261b539 chore(deps): update sigstore/cosign-installer action to v4 (#344)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-04 19:14:41 +02:00
renovate[bot] 353eb53280 chore(deps): update docker/login-action action to v4 (#325)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 20:53:19 +01:00
renovate[bot] 4c328b2c82 chore(deps): update docker/setup-qemu-action action to v4 (#326)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 20:53:11 +01:00
renovate[bot] 280c20136a chore(deps): update docker/setup-buildx-action action to v4 (#327)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 20:53:03 +01:00
renovate[bot] 4e1761644c chore(deps): update docker/metadata-action action to v6 (#328)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 20:52:56 +01:00
renovate[bot] 5a28a99203 chore(deps): update docker/build-push-action action to v7 (#329)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 20:52:45 +01:00
ThePhaseless 8bf82a081a [skip ci] remove claude code reviews 2025-12-26 19:57:34 +00:00
renovate[bot] 98de158d00 chore(deps): update actions/github-script action to v8 (#280)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-26 19:37:10 +01:00
renovate[bot] da620267b8 chore(deps): update actions/checkout action to v6 (#282)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-26 19:35:17 +01:00
ThePhaselessandClaude da6d90fabc renovate - Only test (#281)
* Skip build and review for Renovate PRs, only run tests

Modified CI workflows to optimize Renovate PRs:
- Skip Docker build and merge-and-push jobs for Renovate PRs
- Skip Claude code review for Renovate PRs
- Tests still run for all PRs including Renovate

This reduces CI time and resource usage for dependency update PRs.

* Remove redundant condition from merge-and-push job

The merge-and-push job depends on build job, so it won't run if build is skipped.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-20 01:39:54 +01:00
ThePhaselessandClaude c45a464462 Add Building Feature (#276)
* feat: Build Docker images for PRs with branch name labels

- Remove condition preventing PR builds
- Add branch name extraction and sanitization
- Add branch labels to Docker images (org.opencontainers.image.branch and branch)
- Enable pushing of PR Docker images
- Sanitize branch names for Docker tags (replace / with -)

This allows PR images to be built and tagged with their branch names,
making it easier to test specific PR builds.

* feat: Add path filters to Docker workflow

Only build Docker images when relevant files change:
- Source code (src/**, main.py, tests/**)
- Docker configuration (Dockerfile, compose.yaml)
- Dependencies (pyproject.toml, uv.lock)
- Workflow file itself

This prevents unnecessary builds when only documentation or
other non-functional files are changed.

* feat: Add automatic cleanup of PR Docker images

Create a new workflow that automatically deletes Docker images
when a PR is closed or merged. This prevents accumulation of
old PR images in the container registry.

Features:
- Triggers on PR close/merge events
- Deletes images tagged with PR number and SHA
- Handles both architecture variants (amd64, arm64)
- Supports both organization and user repositories
- Provides detailed logging of cleanup operations

* refactor: Remove redundant branch label preparation

Remove duplicate branch name preparation step in merge-and-push job.
Branch labels are already added during the build step, so no need
to add them again when creating the manifest.

* refactor: Remove redundant label configurations

Remove custom label configurations from docker-publish workflow.
The docker/metadata-action already sets standard OCI labels by
default, so explicit label configuration is unnecessary.

Also removed unused BRANCH_TAG variable preparation.

* refactor: Use PR number for Docker image tags instead of SHA

Changed Docker image tagging strategy for pull requests:
- Use pr-{number}-{arch} for individual platform builds
- Use pr-{number} for final manifest
- Non-PR builds still use SHA-based tags

Benefits:
- Simpler, more readable tags for PRs
- Easier to identify which PR an image belongs to
- Cleanup script simplified to match only PR number tags

Updated cleanup workflow to match new tag pattern.

* docs: Add PR Docker image tags to README

Document the pr-{number} tag pattern used for pull request images.
These images are automatically built for PRs and cleaned up when
the PR is closed.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-20 01:25:00 +01:00
ThePhaseless f1696fe0fd Update claude-code-review.yml 2025-11-15 04:47:34 +01:00
ThePhaseless 12e5a1646b Enable full output for Claude code review action 2025-11-15 04:37:59 +01:00
renovate[bot] 0977a0daf9 chore(deps): update actions/checkout action to v5 (#260)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-17 22:15:25 +02:00
ThePhaseless 560da0daf0 Add Claude Code GitHub Workflow (#259)
* "Claude PR Assistant workflow"

* "Claude Code Review workflow"
2025-10-15 08:20:21 +02:00
ThePhaseless d29666151d dont build on pull request 2025-09-11 18:25:04 +02:00
ThePhaseless f98e823991 Migrate to camoufox (#235)
* use camoufox

* build custom branches

* organize compose

* ignore missing stubs

* add init method

* create ADDON PATH

* check if solving is required

* type checking and remove logger

* uv sync

* add timeout

* add descriptiuon

* cancel previous runs

* wildcard minor

* fix proxy

* syntax fix

* [skip ci] fix loop warning

* fix proxy format

* copy over docker ignore

* remove testing line

* comment out port expose

* remove idope

* use strict typechecking

* refactor

* adjust compose

* run init only before test

* try test without init

* add curl

* handle page response

* remove turnsile test

* fix dockerignore symlink

* use newer debian

* bump pytest

* add docker in docker in devcontaienr

* remove unused values

* handle timeouts

* fix edgecase

* use new envs for proxy

* remove init command

* remove testing line

* remove setuptools

* fix linters

* reimport

* readd setuptools

* better float handling
2025-09-05 23:08:35 +02:00
ThePhaseless efcd8f0798 Merge pull request #225 from ThePhaseless/renovate/actions-checkout-5.x
chore(deps): update actions/checkout action to v5
2025-08-17 02:39:46 +02:00
ThePhaseless b29e4c826e cancel previous runs 2025-08-16 22:50:10 +00:00
renovate[bot] 1e443c2dbb chore(deps): update actions/checkout action to v5 2025-08-11 13:34:58 +00:00
ThePhaseless 38b3407b15 fix versioning 2025-04-12 21:53:11 +00:00
ThePhaseless 061f0d44de fix latest tagging 2025-02-28 19:28:05 +01:00
ThePhaseless b7914268bc readd test 2025-02-28 19:16:47 +01:00
ThePhaseless 2e8ed3fa9b remove apt caching 2025-02-28 19:16:09 +01:00
ThePhaseless 6f6941e423 lowercase registry 2025-02-28 19:01:06 +01:00
ThePhaseless 25ae01ba71 remove artifact upload 2025-02-28 18:46:48 +01:00
ThePhaseless a065b4b7ae remove invalid argument 2025-02-28 18:43:55 +01:00
ThePhaseless 508568ded7 login before push 2025-02-28 18:36:00 +01:00
ThePhaseless 72f54fc0a9 push and then merge 2025-02-28 18:33:30 +01:00
ThePhaseless 1499cfa3df push before merging 2025-02-28 18:16:39 +01:00
ThePhaseless cf46f481e1 fix bash 2025-02-28 18:04:23 +01:00
ThePhaseless c90b0ab91e echo args 2025-02-28 17:53:04 +01:00
ThePhaseless f5e75b451c push all tags into one 2025-02-28 17:43:57 +01:00
ThePhaseless 0fbae3f9dd bump buildkit cache 2025-02-28 17:14:40 +01:00
ThePhaseless 70f99e40fc tweak labels 2025-02-28 17:09:23 +01:00
ThePhaseless 6a56098a33 add platform to apt cache name 2025-02-28 16:28:32 +01:00
ThePhaseless 7dd1dd633f upload apt and uv cache 2025-02-28 16:24:20 +01:00
ThePhaseless e825e588a8 add qemu back 2025-02-28 16:17:54 +01:00
ThePhaseless ad88b7b505 comment out test 2025-02-28 16:11:59 +01:00
ThePhaseless 78deb9ed34 tweaks to tags 2025-02-28 16:11:10 +01:00
ThePhaseless 817610d216 add qemu 2025-02-27 20:20:55 +00:00
ThePhaseless 42303d5582 another fix 2025-02-27 19:41:54 +00:00