Skip to content

Commit 1ad65e7

Browse files
committed
Add cross-repo test triggering to CI workflow
- Add trigger-tests job that runs on pull requests - Uses GitHub App token to trigger tests in aws-durable-execution-sdk-python-testing - Sends PR metadata via repository_dispatch event
1 parent e19e978 commit 1ad65e7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,29 @@ jobs:
3737
run: hatch run test:cov
3838
- name: Build distribution
3939
run: hatch build
40+
41+
trigger-tests:
42+
runs-on: ubuntu-latest
43+
if: github.event_name == 'pull_request'
44+
steps:
45+
- name: Generate GitHub App token
46+
id: app-token
47+
uses: actions/create-github-app-token@v1
48+
with:
49+
app-id: ${{ secrets.APP_ID }}
50+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
51+
repositories: aws-durable-execution-sdk-python-testing
52+
53+
- name: Trigger tests in aws-durable-execution-sdk-python-testing
54+
uses: peter-evans/repository-dispatch@v3
55+
with:
56+
token: ${{ steps.app-token.outputs.token }}
57+
repository: aws/aws-durable-execution-sdk-python-testing
58+
event-type: test-pr
59+
client-payload: |
60+
{
61+
"pr_number": "${{ github.event.number }}",
62+
"pr_sha": "${{ github.event.pull_request.head.sha }}",
63+
"pr_ref": "${{ github.event.pull_request.head.ref }}",
64+
"source_repo": "${{ github.repository }}"
65+
}

0 commit comments

Comments
 (0)