diff options
| author | Fuwn <[email protected]> | 2026-02-18 07:52:13 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-18 07:52:13 +0000 |
| commit | d645b9f595a9fc2c680c825c15a5efb4c35c4969 (patch) | |
| tree | 26918a55df1baa11776c08364a3cac794a45aa90 /justfile | |
| parent | feat(response): Add input/sensitive-input handling (diff) | |
| download | september-d645b9f595a9fc2c680c825c15a5efb4c35c4969.tar.xz september-d645b9f595a9fc2c680c825c15a5efb4c35c4969.zip | |
build: Switch from Earthly to Dockerfile
Diffstat (limited to 'justfile')
| -rw-r--r-- | justfile | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -2,6 +2,11 @@ import? 'cargo.just' set allow-duplicate-recipes := true +name := "september" +ghcr_repo := "ghcr.io/gemrest/" + name +gitlab_repo := "registry.gitlab.com/gemrest/" + name +docker_hub_repo := "docker.io/gemrest/" + name + default: @just --list @@ -10,3 +15,26 @@ fetch: fmt: cargo +nightly fmt + +# Build once, then push both `latest` and the latest git tag to all registries. +publish-images: + #!/usr/bin/env bash + + set -euo pipefail + + git_tag="$(git describe --tags --abbrev=0)" + docker_tag="${git_tag#v}" + + docker build --platform linux/amd64 -f Dockerfile -t {{name}}:build . + + for registry in {{ghcr_repo}} {{gitlab_repo}} {{docker_hub_repo}}; do + docker tag {{name}}:build "$registry:latest" + docker tag {{name}}:build "$registry:$docker_tag" + done + + docker push "{{ghcr_repo}}:latest" + docker push "{{ghcr_repo}}:$docker_tag" + docker push "{{gitlab_repo}}:latest" + docker push "{{gitlab_repo}}:$docker_tag" + docker push "{{docker_hub_repo}}:latest" + docker push "{{docker_hub_repo}}:$docker_tag" |