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:
parent
5033c7b2f6
commit
251e4aebb5
1 changed files with 2 additions and 1 deletions
3
.github/workflows/deploy.yml
vendored
3
.github/workflows/deploy.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue