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.
This commit is contained in:
Jon Seager 2026-02-06 19:58:24 +00:00
parent 5033c7b2f6
commit 251e4aebb5
No known key found for this signature in database

View file

@ -87,7 +87,8 @@ jobs:
- name: Upload container to ghcr.io - name: Upload container to ghcr.io
run: | run: |
docker load < result docker load < result
docker tag "jnsgruk/brewlog:$(git rev-parse --short HEAD)" "ghcr.io/jnsgruk/brewlog:$(git rev-parse --short HEAD)" version=$(cat Cargo.toml | nix run nixpkgs#tomlq -- -r .package.version)
docker tag "brewlog:${version}" "ghcr.io/jnsgruk/brewlog:$(git rev-parse --short HEAD)"
docker push "ghcr.io/jnsgruk/brewlog:$(git rev-parse --short HEAD)" docker push "ghcr.io/jnsgruk/brewlog:$(git rev-parse --short HEAD)"
- name: Deploy site - name: Deploy site