chore: redo container publishing, port dev-container to bazel

This commit is contained in:
41666 2020-10-07 02:02:42 -04:00
parent 101c476739
commit b834066479
14 changed files with 129 additions and 603 deletions

17
hack/publish.bzl Normal file
View file

@ -0,0 +1,17 @@
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
def publish(
service,
name = "+publish",
image = ":image",
prefix = "roleypoly/roleypoly/",
registry = "docker.pkg.github.com",
):
container_push(
name = name,
format = "Docker",
image = image,
registry = registry,
repository = prefix + service,
tag = "{STABLE_URL_SAFE_TAG}",
)

View file

@ -1,4 +1,5 @@
#!/bin/bash
echo "STABLE_GIT_COMMIT $(git rev-parse --short HEAD)"
echo "STABLE_GIT_BRANCH $(git rev-parse --abbrev-ref HEAD)"
echo "STABLE_URL_SAFE_TAG $(git rev-parse --abbrev-ref HEAD | tr '/' '-')"
echo "BUILD_DATE $(date -Iseconds)"