generated from layer5io/layer5-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 71
57 lines (50 loc) · 1.75 KB
/
error-ref-publisher.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
47
48
49
50
51
52
53
54
55
56
57
name: Error Code Reference Publisher
on:
push:
branches:
- 'master'
jobs:
error-ref:
name: Error codes utility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# token here with write access to meshkit repo
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: ${{ secrets.GO_VERSION }}
- name: Run utility
run: |
make errorutil-analyze
# to update errorutil* files in meshkit repo
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: l5io
commit_user_email: ci@layer5.io
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: '--signoff'
commit_message: "run error codes utility"
file_pattern: helpers/
# to push changes to meshery docs
- name: Checkout meshery
uses: actions/checkout@v2
with:
repository: 'meshery/meshery'
# token with write access to meshery repository
token: ${{ secrets.GH_ACCESS_TOKEN }}
path: 'meshery'
ref: 'master'
- name: Update and push docs
run: |
echo '{ "errors_export": '$(cat ./helpers/errorutil_errors_export.json)' }' | jq > ./meshery/docs/_data/errorref/meshkit_errors_export.json
cd ./meshery
git config user.name l5io
git config user.email ci@layer5.io
git add ./docs/_data/errorref/meshkit_errors_export.json
git commit -m "[Docs] Error Code Reference: Updated codes for MeshKit library" --signoff
git push origin master
cd ../