hermes-agent/.github/workflows
Ben 66489f38c7 fix(docker): bake build-time git SHA into the image
`hermes dump` and the startup banner both call `git rev-parse HEAD` to
report the running commit, but `.dockerignore` line 2 excludes `.git` —
so inside the published image `hermes dump` shows
`version: ... [(unknown)]` and the banner drops its `· upstream <sha>`
suffix entirely.  That makes support triage from container bug reports
impossible: we can't tell which commit the user is actually running.

Fix: thread the build-time SHA through as a Docker build-arg, write it
to `/opt/hermes/.hermes_build_sha` in the image, and have a new
`hermes_cli/build_info.get_build_sha()` read it as a fallback after the
existing live-git lookup fails.  Output format is unchanged in both
callsites — same 8-char short SHA whether resolved live or baked.

Wiring:
  - Dockerfile: `ARG HERMES_GIT_SHA=` + write-file step after the source
    copy.  Empty/missing arg → no file written → callers fall through to
    live git (so local `docker build` without --build-arg is unchanged).
  - docker-publish.yml: passes `HERMES_GIT_SHA=${{ github.sha }}` on all
    four build-push-action steps (amd64/arm64, smoke-test + final push).
  - dump.py:_get_git_commit() / banner.py:get_git_banner_state(): try
    live git first, fall back to baked SHA, then to legacy `(unknown)`
    / None.  Banner returns `upstream == local, ahead=0` because a built
    image is by definition pinned to one commit.

Coverage:
  - Unit tests cover build_info (file present/absent/empty/error,
    truncation, whitespace), dump (live-git wins, both fallbacks,
    identical output-format regression guard), and banner (no-repo +
    baked, no-repo + no-sha, shallow-clone fallback).
  - tests/docker/test_dump_build_sha.py is an integration regression
    guard that runs against the real image, reads
    `/opt/hermes/.hermes_build_sha`, and asserts `hermes dump` surfaces
    its content (or stays at `(unknown)` if no file).
  - Verified end-to-end: `docker build --build-arg HERMES_GIT_SHA=abc...`
    → `docker run ... dump` reports `[abc12345]`; without the build-arg
    it reports `[(unknown)]` as before.
2026-05-28 15:14:05 +10:00
..
contributor-check.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00
deploy-site.yml fix(skills-hub): show every catalog source on /docs/skills (skills.sh, ClawHub, browse.sh, OpenAI, …) (#32336) 2026-05-25 18:34:54 -07:00
docker-lint.yml ci(docker): add hadolint + shellcheck for container build inputs 2026-05-24 18:05:14 -07:00
docker-publish.yml fix(docker): bake build-time git SHA into the image 2026-05-28 15:14:05 +10:00
docs-site-checks.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00
history-check.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00
lint.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00
nix-lockfile-fix.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00
nix.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00
osv-scanner.yml chore(actions)(deps): bump the actions-minor-patch group across 1 directory with 2 updates 2026-05-19 03:27:09 -07:00
skills-index-freshness.yml feat(skills-hub): health checks, freshness badge, and a watchdog cron (#32345) 2026-05-25 23:10:45 -07:00
skills-index.yml fix(skills-hub): show every catalog source on /docs/skills (skills.sh, ClawHub, browse.sh, OpenAI, …) (#32336) 2026-05-25 18:34:54 -07:00
supply-chain-audit.yml ci(supply-chain): anchor install-hook regex at repo root (#31744) 2026-05-24 17:46:08 -07:00
tests.yml feat(ci): use 6-way slicing based on benchmark results 2026-05-22 19:46:18 -07:00
upload_to_pypi.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00
uv-lockfile-check.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00