Skip to content

Commit

Permalink
Trigger SDK regression from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
samarsault committed Mar 6, 2023
1 parent 9b4866d commit ccddfd8
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/sdk-regression.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
pull_request:
types: [opened]
issue_comment:
types: [created]

jobs:
check-regression:
name: Check if needs to run sdk regression
runs-on: ubuntu-latest
outputs:
run-regression: ${{steps.regcheck.outputs.triggered}}
steps:
- uses: khan/pull-request-comment-trigger@master
name: Check if regression
if: github.event_name == 'pull_request'
id: regcheck
with:
trigger: 'RUN_SDK_REGRESSION'
sdk-regression:
name: Trigger SDK regression test
runs-on: ubuntu-latest
needs: check-regression
if: needs.check-regression.outputs.run-regression == 'true'
strategy:
matrix:
repo: [percy-cypress]
steps:
- name: Trigger Workflow
uses: actions/github-script@v6
with:
script: |
github.rest.actions.createWorkflowDispatch({
owner: 'percy',
repo: ${{ matrix.repo}}
workflow_id: 'test.yml',
ref: '${{ github.ref }}',
})

0 comments on commit ccddfd8

Please sign in to comment.