Skip to content

Commit e3d8c26

Browse files
Merge pull request #17 from opf/fix/e2e-pullpreview-integration-dispatch-inputs
fix(ci): declare integration_repo and integration_workflow for PullPr…
2 parents 170009d + ae7096c commit e3d8c26

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/e2e-pullpreview.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ on:
3636
required: true
3737
default: main
3838
type: string
39+
integration_repo:
40+
description: "Repository that owns PullPreview deployment"
41+
required: true
42+
default: opf/integration-qa-helmfile
43+
type: string
44+
integration_workflow:
45+
description: "Dispatchable workflow filename in integration repo"
46+
required: true
47+
default: pullpreview-dispatch.yml
48+
type: string
3949
openproject_version:
4050
description: "OpenProject image tag"
4151
required: false
@@ -155,6 +165,11 @@ jobs:
155165
workflow_file="${{ github.event.inputs.integration_workflow }}"
156166
target_ref="${{ github.event.inputs.integration_ref }}"
157167
168+
if [ -z "${owner_repo}" ] || [ -z "${workflow_file}" ]; then
169+
echo "::error::integration_repo and integration_workflow must be set."
170+
exit 1
171+
fi
172+
158173
payload="$(jq -n \
159174
--arg ref "$target_ref" \
160175
--arg action "up" \
@@ -412,6 +427,11 @@ jobs:
412427
workflow_file="${{ github.event.inputs.integration_workflow }}"
413428
target_ref="${{ github.event.inputs.integration_ref }}"
414429
430+
if [ -z "${owner_repo}" ] || [ -z "${workflow_file}" ]; then
431+
echo "::warning::integration_repo or integration_workflow empty; skipping teardown dispatch."
432+
exit 0
433+
fi
434+
415435
payload="$(jq -n \
416436
--arg ref "$target_ref" \
417437
--arg action "down" \

0 commit comments

Comments
 (0)