From 66f794860fe18410284cf22da0c30ed9b96581bf Mon Sep 17 00:00:00 2001 From: Rafael Vescovi <17483715+ravescovi@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:01:08 -0600 Subject: [PATCH] fix docker latest --- .github/workflows/docker-build.yml | 6 ++++++ .github/workflows/docker-publish.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index d92f768..bcc6674 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -54,6 +54,12 @@ jobs: uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=schedule + type=ref,event=branch + type=ref,event=tag + type=ref,event=pr + type=raw,value=latest,enable={{is_default_branch}} # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 8039640..d26b14f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -20,8 +20,6 @@ env: jobs: build_and_publish: - - # environment: production runs-on: ubuntu-latest permissions: contents: read @@ -54,6 +52,12 @@ jobs: uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=schedule + type=ref,event=branch + type=ref,event=tag + type=ref,event=pr + type=raw,value=latest,enable={{is_default_branch}} # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action