File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Notify E2E Tests
2+
3+ # Triggers the constructive-tests repo to update submodules and run E2E tests
4+ # when changes are pushed to main.
5+
6+ on :
7+ push :
8+ branches : [main]
9+
10+ jobs :
11+ trigger-tests :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Trigger submodule update in constructive-tests
15+ uses : actions/github-script@v7
16+ with :
17+ github-token : ${{ secrets.GH_SUBMODULE_PAT }}
18+ script : |
19+ const message = context.payload.head_commit?.message || '';
20+ // Escape backticks and truncate long messages
21+ const safeMessage = message.replace(/`/g, "'").substring(0, 500);
22+
23+ await github.rest.repos.createDispatchEvent({
24+ owner: 'constructive-io',
25+ repo: 'constructive-tests',
26+ event_type: 'submodule-updated',
27+ client_payload: {
28+ repo: '${{ github.repository }}',
29+ ref: '${{ github.ref_name }}',
30+ sha: '${{ github.sha }}',
31+ commit_message: safeMessage
32+ }
33+ });
34+ console.log('Dispatched submodule-updated to constructive-tests');
You can’t perform that action at this time.
0 commit comments