Skip to content

Commit 57f4652

Browse files
authored
chore: migrate workflows to repository_dispatch (#1102)
### Description Migrates workflows from `deployment_status` events to `repository_dispatch`. ### Type of Change - [ ] New Example - [ ] Example updates (Bug fixes, new features, etc.) - [x] Other (changes to the codebase, but not to examples)
1 parent 1c231d4 commit 57f4652

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

solutions/testing/.github/workflows/playwright-reusable.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- name: Run ${{ inputs.test-type }} tests
6363
run: pnpm run ${{ inputs.test-type }}
6464
env:
65-
BASE_URL: ${{ github.event_name == 'deployment_status' && github.event.deployment_status.environment_url || 'https://solutions-testing.vercel.app' }}
65+
BASE_URL: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.url || 'https://solutions-testing.vercel.app' }}
6666

6767
- name: Upload test results to GitHub
6868
if: ${{ always() }}

solutions/testing/.github/workflows/playwright.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Playwright
22

33
on:
4-
deployment_status:
4+
repository_dispatch:
5+
types:
6+
- 'vercel.deployment.success'
57
schedule:
68
# Runs at the minute 30 of every hour
79
- cron: '30 0/1 * * *'
@@ -10,15 +12,15 @@ jobs:
1012
e2e:
1113
name: 'E2E'
1214
# Only run on a Preview or Production deployment.
13-
if: ${{ github.event_name == 'schedule' || (github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success') }}
15+
if: ${{ github.event_name == 'schedule' || (github.event_name == 'repository_dispatch' }}
1416
uses: ./.github/workflows/playwright-reusable.yml
1517
with:
1618
test-type: 'e2e'
1719
secrets: inherit
1820

1921
integration:
2022
name: Integration
21-
if: ${{ github.event_name == 'schedule' || (github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success') }}
23+
if: ${{ github.event_name == 'schedule' || (github.event_name == 'repository_dispatch' }}
2224
uses: ./.github/workflows/playwright-reusable.yml
2325
with:
2426
test-type: 'integration'

0 commit comments

Comments
 (0)