File tree Expand file tree Collapse file tree 2 files changed +33
-5
lines changed Expand file tree Collapse file tree 2 files changed +33
-5
lines changed Original file line number Diff line number Diff line change @@ -13,20 +13,22 @@ jobs:
13
13
- uses : actions/github-script@v7
14
14
env :
15
15
ACTOR : ${{ github.actor }}
16
+ AUTHOR : ${{ github.event.head_commit.author.name }}
16
17
MESSAGE : ${{ github.event.head_commit.message }}
17
18
SHA : ${{ github.sha }}
18
19
with :
19
20
github-token : ${{ secrets.DOWNSTREAM_TOKEN }}
20
21
script : |
21
- const { ACTOR, MESSAGE, SHA } = process.env;
22
+ const { ACTOR, AUTHOR, MESSAGE, SHA } = process.env;
22
23
const result = await github.rest.actions.createWorkflowDispatch({
23
24
owner: '${{ secrets.DOWNSTREAM_OWNER }}',
24
25
repo: '${{ secrets.DOWNSTREAM_REPO_V2 }}',
25
26
workflow_id: '${{ secrets.DOWNSTREAM_WORKFLOW_ID_V2 }}',
26
27
ref: 'main',
27
28
inputs: {
28
- sha: SHA,
29
29
actor: ACTOR,
30
- message: MESSAGE
30
+ author: AUTHOR,
31
+ message: MESSAGE,
32
+ sha: SHA
31
33
}
32
34
});
Original file line number Diff line number Diff line change @@ -71,10 +71,36 @@ jobs:
71
71
registry : ghcr.io
72
72
username : ${{ github.actor }}
73
73
password : ${{ secrets.GITHUB_TOKEN }}
74
- - name : Load environment variables from .env
74
+ - name : Load Environment Variables from .env
75
75
uses : xom9ikk/dotenv@v2
76
- - name : Publish images
76
+ - name : Publish Images
77
77
if :
78
78
needs.publish_common_utils.outputs.changeset_outputs_hasChangesets ==
79
79
' false'
80
80
run : make ${{ matrix.release }}
81
+ - name : Get Downstream App Installation Token
82
+ id : auth
83
+ uses : actions/create-github-app-token@v2
84
+ with :
85
+ app-id : ${{ secrets.DOWNSTREAM_CH_APP_ID }}
86
+ private-key : ${{ secrets.DOWNSTREAM_CH_APP_PRIVATE_KEY }}
87
+ - name : Notify Downstream
88
+ if :
89
+ needs.publish_common_utils.outputs.changeset_outputs_hasChangesets ==
90
+ ' false'
91
+ uses : actions/github-script@v7
92
+ env :
93
+ TAG : ${{ env.IMAGE_VERSION }}.${{ env.IMAGE_VERSION_SUB_TAG }}
94
+ with :
95
+ github-token : ${{ steps.auth.outputs.token }}
96
+ script : |
97
+ const { TAG } = process.env;
98
+ const result = await github.rest.actions.createWorkflowDispatch({
99
+ owner: '${{ secrets.DOWNSTREAM_CH_OWNER }}',
100
+ repo: '${{ secrets.DOWNSTREAM_DP_REPO }}',
101
+ workflow_id: '${{ secrets.DOWNSTREAM_DP_WORKFLOW_ID }}',
102
+ ref: 'main',
103
+ inputs: {
104
+ tag: TAG
105
+ }
106
+ });
You can’t perform that action at this time.
0 commit comments