aboutsummaryrefslogtreecommitdiff
path: root/justfile
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-14 21:53:11 -0800
committerFuwn <[email protected]>2026-02-14 21:53:24 -0800
commitd277dbfc6f2ca5363928ee9ad41e3460a834242f (patch)
treed54b6611a25ea083a34b1bc2403b1fa70417b0c7 /justfile
parentfix(blog): Remove extra whitespace on category pages without descriptions (diff)
downloadlocus-d277dbfc6f2ca5363928ee9ad41e3460a834242f.tar.xz
locus-d277dbfc6f2ca5363928ee9ad41e3460a834242f.zip
build(container): Add justfile recipe to build and push latest/date tags to GitHub and GitLab
Diffstat (limited to 'justfile')
-rw-r--r--justfile27
1 files changed, 27 insertions, 0 deletions
diff --git a/justfile b/justfile
new file mode 100644
index 0000000..8f39114
--- /dev/null
+++ b/justfile
@@ -0,0 +1,27 @@
+set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
+
+ghcr_repo := "ghcr.io/gemrest/locus"
+gitlab_repo := "registry.gitlab.com/gemrest/locus"
+
+default:
+ just --list
+
+# Build once, then push both `latest` and `YYYY-MM-DD` tags to both registries.
+publish-images:
+ #!/usr/bin/env bash
+
+ set -euo pipefail
+
+ date_tag="$(date -u +%Y-%m-%d)"
+
+ docker build -f Dockerfile -t locus:build .
+
+ for registry in {{ghcr_repo}} {{gitlab_repo}}; do
+ docker tag locus:build "$registry:latest"
+ docker tag locus:build "$registry:$date_tag"
+ done
+
+ docker push "{{ghcr_repo}}:latest"
+ docker push "{{ghcr_repo}}:$date_tag"
+ docker push "{{gitlab_repo}}:latest"
+ docker push "{{gitlab_repo}}:$date_tag"