Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💚 Trigger CLI Regression on PR comment #1201

Merged
merged 6 commits into from
Mar 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]
itsjwala marked this conversation as resolved.
Show resolved Hide resolved

jobs:
check-regression:
itsjwala marked this conversation as resolved.
Show resolved Hide resolved
name: Check if needs to run sdk regression
itsjwala marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
outputs:
run-regression: ${{steps.regcheck.outputs.triggered}}
steps:
- uses: khan/pull-request-comment-trigger@master
itsjwala marked this conversation as resolved.
Show resolved Hide resolved
name: Check if regression
if: github.event_name == 'pull_request'
id: regcheck
with:
trigger: 'RUN_SDK_REGRESSION'
itsjwala marked this conversation as resolved.
Show resolved Hide resolved
sdk-regression:
itsjwala marked this conversation as resolved.
Show resolved Hide resolved
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 }}',
})
itsjwala marked this conversation as resolved.
Show resolved Hide resolved