From 1ec632a493b95701d21a812491b5ad495ce48322 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 6 Oct 2022 20:36:31 +1000 Subject: [PATCH] fix(docker): Add edge tag to Docker images, document when latest tag will appear (#5312) * Add latest and edge tags to Docker images * Document how latest tag actually works * Try a different syntax for is_default_branch * Try again * One last try * Revert changes that don't work Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .github/workflows/build-docker-image.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index ac744e2a..c5628038 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -75,12 +75,17 @@ jobs: # generate Docker tags based on the following events/attributes tags: | type=schedule + # semver and ref,tag automatically add a "latest" tag, but only on stable releases type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} + type=ref,event=tag type=ref,event=branch type=ref,event=pr type=sha + # edge is the latest commit on the default branch. + # TODO: We only want edge builds for `us-docker.pkg.dev`, because DockerHub doesn't keep up with every `main` branch commit. + type=edge,enable={{is_default_branch}} # Setup Docker Buildx to allow use of docker cache layers from GH - name: Set up Docker Buildx