Skip to content

Commit

Permalink
chore: update workflow to use workflow_dispatch
Browse files Browse the repository at this point in the history
with inputs for DHIS2 version and instance URL
Resolves issue with triggering tests from non-default branches.
  • Loading branch information
adeldhis2 committed Sep 12, 2024
1 parent 89560b4 commit 235e017
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/e2e-test-dispatch.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
name: 'dhis2: e2e tests triggered by core'

on:
repository_dispatch:
types: [apps-e2e-tests-trigger]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

env:
GIT_AUTHOR_NAME: '@dhis2-bot'
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_NAME: '@dhis2-bot'
GIT_COMMITTER_EMAIL: '[email protected]'
GH_TOKEN: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}
D2_VERBOSE: true
CI: true
workflow_dispatch:
inputs:
dhis2_version:
description: 'DHIS2 core version'
required: true
instance_url:
description: 'Instance URL'
required: true

jobs:
setup-matrix:
Expand All @@ -33,7 +27,7 @@ jobs:
with:
should_record: ${{ contains(github.event.head_commit.message, '[e2e record]') || contains(join(github.event.pull_request.labels.*.name), 'e2e record')}}
spec-group: ${{ needs.setup-matrix.outputs.matrix }}
instance_url: ${{ github.event.client_payload.instance_url }}
instance_url: ${{ github.event.inputs.instance_url }}
secrets:
username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
Expand Down

0 comments on commit 235e017

Please sign in to comment.