Skip to content

Commit

Permalink
Only push Docker containers on release
Browse files Browse the repository at this point in the history
  • Loading branch information
axsuul committed Nov 13, 2023
1 parent 9e926b5 commit 88370b2
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 88370b2

Please sign in to comment.