1- name : Called update for API change
1+ name : " Called update for API change"
22on :
33 repository_dispatch :
4- types : [api_update]
4+ types : [" api_update" ]
55jobs :
66 test :
77 name : " Create PR for API update"
@@ -14,48 +14,28 @@ jobs:
1414 id : buf-update
1515 uses : authzed/actions/buf-api-update@main
1616 with :
17- api-commit : ${{ github.event.client_payload.BUFTAG }}
17+ api-commit : " ${{ github.event.client_payload.BUFTAG }}"
1818 spec-path : buf.gen.yaml
19- file-format : generate-shell-script
19+ file-format : " buf-gen-yaml "
2020 - name : " Output update status"
2121 env :
2222 UPDATED_STATUS : ${{ steps.buf-update.outputs.updated }}
2323 run : |
2424 echo "Update status: $UPDATED_STATUS"
25- - name : " Update package version"
26- uses : authzed/actions/semver-update@main
27- if : steps.buf-update.outputs.updated == 'true'
28- with :
29- sourcefile-path : package.json
30- version-regex : ' "version": "(.+)"'
31- version-change : minor
32- - name : " Update js-dist package version"
33- uses : authzed/actions/semver-update@main
34- if : steps.buf-update.outputs.updated == 'true'
35- with :
36- sourcefile-path : js-dist/package.json
37- version-regex : ' "version": "(.+)"'
38- version-change : minor
39- - name : " Install NPM deps"
40- uses : bahmutov/npm-install@v1
41- if : steps.buf-update.outputs.updated == 'true'
42- with :
43- useLockFile : false
44- working-directory : ./
4525 - name : " Install buf"
46- uses : " bufbuild/buf-setup-action@v1.46.0"
47- if : steps.buf-update.outputs.updated == 'true'
26+ uses : " bufbuild/buf-setup-action@v1.43.0"
4827 with :
49- version : " 1.37.0"
28+ github_token : ${{ secrets.GITHUB_TOKEN }}
29+ if : steps.buf-update.outputs.updated == 'true'
5030 - name : " Run buf generate"
5131 if : steps.buf-update.outputs.updated == 'true'
52- run : |
53- ./buf.gen.yaml
32+ run : " buf generate"
5433 - name : Create Pull Request
5534 uses : peter-evans/create-pull-request@v7.0.5
5635 if : steps.buf-update.outputs.updated == 'true'
5736 with :
5837 delete-branch : " true"
59- title : Update API to ${{ github.event.client_payload.BUFTAG }}
60- branch : api-change/${{ github.event.client_payload.BUFTAG }}
38+ title : " Update API to ${{ github.event.client_payload.BUFTAG }}"
39+ branch : " api-change/${{ github.event.client_payload.BUFTAG }}"
40+ base : " main"
6141 token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments