forked from apache/atlas
-
Notifications
You must be signed in to change notification settings - Fork 10
46 lines (43 loc) · 1.25 KB
/
chart-release-dispatcher.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Name of the Workflow
name: Charts Values Seed Trigger Dispatcher
on:
workflow_run:
workflows:
- "Java CI with Maven"
branches:
- master
- beta
types:
- completed
jobs:
charts-release-dispatcher:
name: Dispatch
runs-on: ubuntu-latest
strategy:
matrix:
repo: ['atlanhq/atlan']
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
# extract branch name
- name: Get branch name
id: extract_branch
run: |
echo "branch=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT
- name: Extract Repository Name
id: extract_repo_name
run: |
repo_name=$(basename $GITHUB_REPOSITORY)
echo "repo_name=${repo_name}" >> $GITHUB_OUTPUT
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.my_pat }}
repository: ${{ matrix.repo }}
event-type: dispatch_chart_release_workflow
client-payload: |-
{
"repo": {
"name": "${{ steps.extract_repo_name.outputs.repo_name }}",
"branch": "${{ steps.extract_branch.outputs.branch }}"
}
}