forked from meshery/meshery
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.79 KB
/
error-codes-updater.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
name: Meshkit Error Codes Utility Runner
on:
push:
branches:
- 'master'
paths:
- '**.go'
jobs:
Update-error-codes:
name: Error codes utility
if: github.repository == 'meshery/meshery'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: 'master'
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: ${{ secrets.GO_VERSION }}
- name: Build Error Utility
run: |
go get github.com/layer5io/meshkit/cmd/errorutil@master
go build -o ~/errorutil github.com/layer5io/meshkit/cmd/errorutil
- name: Run Utility For Meshery Server
run: |
~/errorutil update -d . -i ./helpers -o ./helpers --skip-dirs mesheryctl
echo '{ "errors_export": "" }' | jq --slurpfile export ./helpers/errorutil_errors_export.json '.errors_export = $export[0]' > ./docs/_data/errorref/meshery-server_errors_export.json
- name: Run Utility For Mesheryctl
run: |
cd ./mesheryctl
~/errorutil update -d . -i ./helpers -o ./helpers
echo '{ "errors_export": "" }' | jq --slurpfile export ./helpers/errorutil_errors_export.json '.errors_export = $export[0]' > ../docs/_data/errorref/mesheryctl_errors_export.json
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: mesheryctl/helpers helpers/ **.go docs/
commit_user_name: l5io
commit_user_email: [email protected]
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: '--signoff'
commit_message: "[Error Codes]: Update Meshery server and mehseryctl error codes and reference"