build: upload soon and edge tags to dockerhub (#258)

Resolves #160

Adds a job which will push a tag with the pace value to DockerHub.
Technically also adds a `live` tag which references the same image as
the `latest` tag.
This commit is contained in:
Matthew LeVan 2023-02-28 16:25:05 -06:00 committed by GitHub
commit 2f5a8bbbe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -200,6 +200,11 @@ jobs:
run: |
bazel run //docker:push_version_x86_64
- name: Build and push pace-tagged Docker image
if: ${{ inputs.docker && matrix.target == 'linux-x86_64' }}
run: |
bazel run //docker:push_pace_x86_64
- name: Build and push latest-tagged Docker image
if: ${{ inputs.docker && matrix.target == 'linux-x86_64' && inputs.pace == 'live' }}
run: |

View File

@ -75,6 +75,16 @@ genrule(
visibility = ["//visibility:private"],
)
genrule(
name = "pace_tag",
srcs = ["PACE"],
outs = ["docker_pace_tag"],
cmd = """
tr -d '\n' < $< > $@
""",
visibility = ["//visibility:private"],
)
container_push(
name = "push_latest_x86_64",
format = "Docker",
@ -94,3 +104,13 @@ container_push(
tag_file = ":version_tag",
visibility = ["//visibility:public"],
)
container_push(
name = "push_pace_x86_64",
format = "Docker",
image = ":image_x86_64",
registry = "docker.io",
repository = _docker_repository,
tag = ":pace_tag",
visibility = ["//visibility:public"],
)