Skip to content

Commit

Permalink
chore: migrate workflows to repository_dispatch (#1102)
Browse files Browse the repository at this point in the history
### 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)
  • Loading branch information
erikareads authored Mar 6, 2025
1 parent 1c231d4 commit 57f4652
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Run ${{ inputs.test-type }} tests
run: pnpm run ${{ inputs.test-type }}
env:
BASE_URL: ${{ github.event_name == 'deployment_status' && github.event.deployment_status.environment_url || 'https://solutions-testing.vercel.app' }}
BASE_URL: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.url || 'https://solutions-testing.vercel.app' }}

- name: Upload test results to GitHub
if: ${{ always() }}
Expand Down
8 changes: 5 additions & 3 deletions solutions/testing/.github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Playwright

on:
deployment_status:
repository_dispatch:
types:
- 'vercel.deployment.success'
schedule:
# Runs at the minute 30 of every hour
- cron: '30 0/1 * * *'
Expand All @@ -10,15 +12,15 @@ jobs:
e2e:
name: 'E2E'
# Only run on a Preview or Production deployment.
if: ${{ github.event_name == 'schedule' || (github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success') }}
if: ${{ github.event_name == 'schedule' || (github.event_name == 'repository_dispatch' }}
uses: ./.github/workflows/playwright-reusable.yml
with:
test-type: 'e2e'
secrets: inherit

integration:
name: Integration
if: ${{ github.event_name == 'schedule' || (github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success') }}
if: ${{ github.event_name == 'schedule' || (github.event_name == 'repository_dispatch' }}
uses: ./.github/workflows/playwright-reusable.yml
with:
test-type: 'integration'
Expand Down

0 comments on commit 57f4652

Please sign in to comment.