Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 850fe3e

Browse files
fix: push image only default branch or tag (#5)
1 parent 65d80a3 commit 850fe3e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/push.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: Push
22
on:
33
push:
44
branches:
5-
- "**"
5+
- main
66
tags:
77
- "v*.*.*"
8+
pull_request:
9+
branches:
10+
- main
811
workflow_dispatch:
912
concurrency:
1013
group: ${{ github.workflow }}-${{ github.ref }}-push
@@ -32,7 +35,7 @@ jobs:
3235
- uses: docker/build-push-action@v4.1.1
3336
with:
3437
context: .
35-
push: true
38+
push: ${{ github.event_name != 'pull_request' }}
3639
tags: ${{ steps.meta.outputs.tags }}
3740
labels: ${{ steps.meta.outputs.labels }}
3841
cache-from: type=gha

0 commit comments

Comments
 (0)