Skip to content

Commit 6b00374

Browse files
committed
Add workflow trigger for testing docker image per PR
1 parent ef19d60 commit 6b00374

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Diff for: .github/workflows/docker_publish.yml renamed to .github/workflows/docker_build_test_publish.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
name: Publish docker image
1+
name: Docker Image
22

33
on:
44
schedule:
55
- cron: "0 3 * * *" # At 03:00 every day
6+
pull_request_target:
7+
branches:
8+
- 'main'
9+
types:
10+
- 'opened'
11+
- 'reopened'
12+
- 'synchronize'
613
workflow_dispatch:
714
inputs:
815
git_ref:
@@ -21,7 +28,7 @@ on:
2128
default: trunk
2229
description: "docker image tag"
2330
jobs:
24-
build:
31+
build-test-publish:
2532
runs-on: [self-hosted, auto-provisioned]
2633
steps:
2734
- name: Checkout .github
@@ -102,6 +109,7 @@ jobs:
102109
docker stop local-ydb-test || true
103110
104111
- name: Push docker image
112+
if: ${{ github.event_name != 'pull_request_target' }}
105113
uses: docker/build-push-action@v4
106114
with:
107115
context: .

0 commit comments

Comments
 (0)