Skip to content

Commit eba6886

Browse files
ci: fix tag and push steps
1 parent 3e5ad1c commit eba6886

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/docker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
type=semver,pattern={{major}}.{{minor}}
9898
type=semver,pattern={{major}}
9999
type=sha
100-
type=raw,value=latest,enable={{is_default_branch}}
100+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/main') }}
101101
102102
- name: Setup QEMU
103103
uses: docker/setup-qemu-action@v3
@@ -110,6 +110,7 @@ jobs:
110110
with:
111111
context: .
112112
file: ./${{ matrix.dockerfile }}
113+
push: ${{ github.event_name != 'pull_request' }}
113114
tags: ${{ steps.meta.outputs.tags }}
114115
labels: ${{ steps.meta.outputs.labels }}
115116
cache-from: type=registry,ref=${{ env.REGISTRY_URL }}/${{ env.REGISTRY_USER }}/${{ steps.image_name.outputs.IMAGE }}:buildcache

0 commit comments

Comments
 (0)