diff options
author | Alan Pearce | 2024-12-09 09:38:29 +0100 |
---|---|---|
committer | Alan Pearce | 2024-12-09 09:38:29 +0100 |
commit | 8661363281c2902d2dba875e7f51c3d34d404595 (patch) | |
tree | a7a6850a01722b87015ebcd703b7568bf5fd54c2 | |
parent | 668c1b6a70782da5c25fe9529fe9fcc5ad47b880 (diff) | |
download | website-8661363281c2902d2dba875e7f51c3d34d404595.tar.lz website-8661363281c2902d2dba875e7f51c3d34d404595.tar.zst website-8661363281c2902d2dba875e7f51c3d34d404595.zip |
add date tag to docker image
-rwxr-xr-x | justfile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/justfile b/justfile index ab48179..60fd294 100755 --- a/justfile +++ b/justfile @@ -2,6 +2,7 @@ #!nix develop ``.#ci`` --command just --justfile docker_registry := "registry.fly.io/alanpearce-eu" +docker-tag := env_var_or_default("DOCKER_TAG", `date --utc +%Y%m%d%H%M%S` + "-" + `git rev-parse --short HEAD`) listen_address := env_var_or_default("LISTEN_ADDRESS", "::1") tls_port := env_var_or_default("TLS_PORT", "8443") port := env_var_or_default("PORT", "8080") @@ -34,4 +35,4 @@ ci: build check-links cd *DEPLOY_FLAGS: fly auth docker templ generate - fly deploy --image $(KO_DOCKER_REPO={{ docker_registry }} ko build --bare ./cmd/server) {{ DEPLOY_FLAGS }} + fly deploy --image $(KO_DOCKER_REPO={{ docker_registry }} ko build --bare --tags {{ docker-tag }} ./cmd/server) {{ DEPLOY_FLAGS }} |