Skip to content

Commit ef80e8d

Browse files
Update build.yml
1 parent 6673e2c commit ef80e8d

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

.github/workflows/build.yml

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1+
12
name: Cli-core Build
23

34
on:
4-
repository_dispatch:
5-
types: [ releaseCliCore ]
6-
push:
7-
branches: [ test_branch_actions ]
5+
# repository_dispatch:
6+
# types: [ releaseCliCore ]
7+
# push:
8+
# branches: [ test_branch_actions ]
89
workflow_dispatch:
9-
env:
10-
CHANGE_LOG: ''
10+
inputs:
11+
cliBranch:
12+
description: 'Run workflow in the branch'
13+
default: main
1114

1215
jobs:
1316
build:
@@ -30,6 +33,7 @@ jobs:
3033
needs: [build]
3134
outputs:
3235
changeLog: ${{ steps.updateFolder.outputs.changeLog }}
36+
versionType: ${{ steps.updateFolder.outputs.versionType }}
3337
steps:
3438
- run: mkdir -p ~/oai_definitions/json
3539
- run: cd ~/oai_definitions
@@ -53,6 +57,7 @@ jobs:
5357
cp -R ~/oai_definitions/CHANGES.md OAI_CHANGES.md
5458
source scripts/updateApiDefinitions.sh
5559
echo "::set-output name=changeLog::$changeLog"
60+
echo "::set-output name=versionType::$versionType"
5661
release:
5762
runs-on: ubuntu-latest
5863
needs: [updateAPIDefinitions]
@@ -94,4 +99,16 @@ jobs:
9499
TAG_NAME: ${{steps.test.outputs.TAG_NAME}}
95100
with:
96101
is_append_body: true
97-
body: ${{needs.updateAPIDefinitions.outputs.changeLog}}
102+
body: "${{needs.updateAPIDefinitions.outputs.changeLog}}"
103+
triggerCliWorkflow:
104+
runs-on: ubuntu-latest
105+
needs: [ updateAPIDefinitions, updateRelease ]
106+
steps:
107+
- name: Invoke CLI workflow with changelog
108+
uses: benc-uk/workflow-dispatch@v1
109+
with:
110+
workflow: Cli Publish
111+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
112+
repo: LakshmiRavali/twilio-cli
113+
ref: "${{ github.event.inputs.cliBranch }}"
114+
inputs: '{ "changeLog": ${{ toJSON(needs.updateAPIDefinitions.outputs.changeLog) }}, "versionType": "${{needs.updateAPIDefinitions.outputs.versionType}}" }'

0 commit comments

Comments
 (0)