From 88370b241d4493a855b116175a44dee757acb00f Mon Sep 17 00:00:00 2001 From: James Hu Date: Sun, 12 Nov 2023 17:00:02 -0800 Subject: [PATCH] Only push Docker containers on release --- .github/workflows/docker.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 41aca1b..18a6ac8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,12 +1,9 @@ name: docker on: - push: - branches: - - '**' - tags: - # Must match pattern (e.g. 0.0.1) - - '*.*.*' + # Only on tagged release + release: + types: [published, edited] jobs: docker: @@ -56,7 +53,6 @@ jobs: # Only build and push Docker images for releases - name: Build and push Docker image to GitHub Container Registry uses: docker/build-push-action@v2 - if: github.event_name == 'release' with: context: . push: true @@ -67,7 +63,6 @@ jobs: cache-to: type=local,dest=/tmp/.buildx-cache-new - name: Update Docker buildx cache - if: github.event_name == 'release' run: | rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache