Skip to content

Commit 748841b

Browse files
authored
Merge pull request #1094 from onekey-sec/build-docker-for-prs
ci: build docker image for dependency updates
2 parents 8726804 + 68d9c0a commit 748841b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build-publish-image.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build Docker image
22

33
on:
4+
pull_request:
45
push:
56
branches:
67
- main
@@ -12,6 +13,7 @@ env:
1213

1314
jobs:
1415
build-image:
16+
if: github.event_name == 'push' || contains(github.event.*.labels.*.name, 'dependencies')
1517
runs-on: ubuntu-latest
1618
strategy:
1719
fail-fast: false
@@ -49,6 +51,7 @@ jobs:
4951
type=sha
5052
5153
- name: Set up QEMU
54+
if: matrix.platform != 'linux/amd64'
5255
uses: docker/setup-qemu-action@v3
5356

5457
- name: Set up Docker Buildx
@@ -109,7 +112,7 @@ jobs:
109112
retention-days: 1
110113

111114
merge-and-push-image:
112-
if: github.repository_owner == 'onekey-sec'
115+
if: github.repository_owner == 'onekey-sec' && github.event_name == 'push'
113116
runs-on: ubuntu-latest
114117
needs:
115118
- build-image

0 commit comments

Comments
 (0)