Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 283abd1

Browse files
committed
add inputs for workflow dispatch with conditional logic
1 parent d3aa1da commit 283abd1

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/azure-load-tests.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ on:
88

99
#- cron: "0 0 * * 1"
1010

11+
workflow_dispatch:
12+
inputs:
13+
load-test-name:
14+
required: true
15+
type: string
16+
description: name of load test that is run
17+
test-id:
18+
required: true
19+
type: string
20+
description: test id for load test
21+
1122
workflow_call:
1223
secrets:
1324
AZURE_CLIENT_ID:
@@ -43,10 +54,24 @@ jobs:
4354

4455

4556
# Run the Azure Load Test
46-
- name: Run Load Test
57+
- name: Run Load Test On Push
58+
if: github.event_name == 'push'
4759
run: |
4860
az load test-run create \
4961
--resource-group "csels-rsti-internal-moderate-rg" \
5062
--load-test-resource "load-testing-internal" \
5163
--test-id "9020b745-5fc4-4284-8803-04076ea09650" \
5264
--test-run-id "run_"`date +"%Y%m%d%_H%M%S"`
65+
# Run the Azure Load Test
66+
67+
- name: Trigger Load Test
68+
if: github.event_name == 'workflow_dispatch'
69+
run: |
70+
az load test-run create \
71+
--resource-group "csels-rsti-internal-moderate-rg" \
72+
--load-test-resource "${{ github.event.inputs.load-test-name }}" \
73+
--test-id "${{ github.event.inputs.test-id }}" \
74+
--test-run-id "run_"`date +"%Y%m%d%_H%M%S"`
75+
76+
77+

0 commit comments

Comments
 (0)