File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ # Notify gdc-nas when a cassette-update PR is merged, triggering commit analysis
2+ name : Notify gdc-nas on cassette merge
3+
4+ on :
5+ pull_request :
6+ types : [closed]
7+ branches :
8+ - master
9+ workflow_dispatch :
10+ inputs :
11+ target_repo :
12+ description : ' gdc-nas repo to notify (owner/repo)'
13+ required : false
14+ default : ' gooddata/gdc-nas'
15+
16+ jobs :
17+ notify :
18+ name : Trigger gdc-nas commit analysis
19+ if : >-
20+ github.event_name == 'workflow_dispatch'
21+ || (github.event.pull_request.merged == true
22+ && startsWith(github.event.pull_request.head.ref, 'auto/cassette-update-'))
23+ runs-on : ubuntu-latest
24+ timeout-minutes : 5
25+ permissions :
26+ contents : read
27+ steps :
28+ - name : Send repository_dispatch to gdc-nas
29+ env :
30+ GH_TOKEN : ${{ secrets.TOKEN_GITHUB_YENKINS_ADMIN }}
31+ TARGET_REPO : ${{ inputs.target_repo || 'gooddata/gdc-nas' }}
32+ run : |
33+ gh api "repos/$TARGET_REPO/dispatches" \
34+ -f event_type=cassette-regeneration-merged \
35+ -f "client_payload[trigger]=cassette-pr-merged" \
36+ -f "client_payload[sha]=${{ github.sha }}" \
37+ -f "client_payload[pr_number]=${{ github.event.pull_request.number || '' }}"
38+ echo "Dispatch sent to $TARGET_REPO"
You can’t perform that action at this time.
0 commit comments