diff --git a/.github/workflows/trigger-integration.yml b/.github/workflows/trigger-integration.yml index b1037ec..e1b37b2 100644 --- a/.github/workflows/trigger-integration.yml +++ b/.github/workflows/trigger-integration.yml @@ -1,6 +1,8 @@ name: Trigger Integration Tests on: + pull_request: + branches: [main] release: types: [published] @@ -10,9 +12,16 @@ jobs: steps: - name: Trigger integration tests env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.INTEGRATION_TOKEN }} run: | - gh api repos/xPyD-hub/xPyD-integration/dispatches \ - -f event_type=release-check \ - -f "client_payload[repo]=xPyD-sim" \ - -f "client_payload[version]=${{ github.event.release.tag_name }}" + if [ "${{ github.event_name }}" = "pull_request" ]; then + gh api repos/xPyD-hub/xPyD-integration/dispatches \ + -f event_type=pr-check \ + -f "client_payload[repo]=xPyD-sim" \ + -f "client_payload[ref]=${{ github.head_ref }}" + else + gh api repos/xPyD-hub/xPyD-integration/dispatches \ + -f event_type=release-check \ + -f "client_payload[repo]=xPyD-sim" \ + -f "client_payload[version]=${{ github.event.release.tag_name }}" + fi diff --git a/.integration-test-trigger b/.integration-test-trigger new file mode 100644 index 0000000..fdb1a61 --- /dev/null +++ b/.integration-test-trigger @@ -0,0 +1 @@ +# trigger test