Skip to content

Commit 79b690e

Browse files
committed
triger on /release PR's
1 parent 79500a7 commit 79b690e

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

.github/workflows/bom-tests.yaml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,37 +39,54 @@ on:
3939
type: boolean
4040
default: true
4141

42+
pull_request:
43+
types:
44+
- opened
45+
- synchronize
46+
- reopened
47+
4248
jobs:
4349
test-luxonis-train:
4450
name: Test Luxonis Train
45-
if: ${{ inputs.run_train }}
51+
if: >-
52+
(github.event_name == 'workflow_dispatch' && inputs.run_train) ||
53+
(github.event_name == 'pull_request' &&
54+
startsWith(github.head_ref, 'release/') &&
55+
github.event.pull_request.base.ref == 'main')
4656
uses: Luxonis/luxonis-train/.github/workflows/tests.yaml@main
4757
with:
48-
ml_ref: ${{ inputs.ml_ref }}
49-
train_ref: ${{ inputs.train_ref }}
58+
ml_ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ml_ref || github.head_ref }}
59+
train_ref: ${{ github.event_name == 'workflow_dispatch' && inputs.train_ref || 'main' }}
5060
secrets:
5161
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
5262
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5363

5464
test-modelconverter:
5565
name: Test Modelconverter
56-
if: ${{ inputs.run_modelconv }}
66+
if: >-
67+
(github.event_name == 'workflow_dispatch' && inputs.run_modelconv) ||
68+
(github.event_name == 'pull_request' &&
69+
startsWith(github.head_ref, 'release/') &&
70+
github.event.pull_request.base.ref == 'main')
5771
uses: Luxonis/modelconverter/.github/workflows/unittests.yaml@main
5872
with:
59-
ml_ref: ${{ inputs.ml_ref }}
60-
modelconv_ref: ${{ inputs.modelconv_ref }}
73+
ml_ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ml_ref || github.head_ref }}
74+
modelconv_ref: ${{ github.event_name == 'workflow_dispatch' && inputs.modelconv_ref || 'main' }}
6175
secrets:
6276
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
6377
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
6478
AWS_S3_ENDPOINT_URL: ${{ secrets.AWS_S3_ENDPOINT_URL }}
6579
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
6680
HUBAI_API_KEY: ${{ secrets.HUBAI_API_KEY }}
6781

68-
6982
test-luxonis-tools:
7083
name: Test Luxonis Tools
71-
if: ${{ inputs.run_tools }}
84+
if: >-
85+
(github.event_name == 'workflow_dispatch' && inputs.run_tools) ||
86+
(github.event_name == 'pull_request' &&
87+
startsWith(github.head_ref, 'release/') &&
88+
github.event.pull_request.base.ref == 'main')
7289
uses: Luxonis/tools/.github/workflows/unittests.yaml@main
7390
with:
74-
ml_ref: ${{ inputs.ml_ref }}
75-
tools_ref: ${{ inputs.tools_ref }}
91+
ml_ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ml_ref || github.head_ref }}
92+
tools_ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tools_ref || 'main' }}

0 commit comments

Comments
 (0)