Skip to content

Commit 15236b8

Browse files
Merge pull request #1327 from gooddata/snapshot-master-6e05e332-to-rel/dev
[bot] Merge master/6e05e332 into rel/dev
2 parents 0913505 + 6e05e33 commit 15236b8

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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"

0 commit comments

Comments
 (0)