Skip to content

Merge pull request #696 from devhindo/fixgolanglint #49

Merge pull request #696 from devhindo/fixgolanglint

Merge pull request #696 from devhindo/fixgolanglint #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-istio'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
# token here with write access to meshery-istio repo
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: "master"
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.23
- name: Run utility
run: |
go run github.com/layer5io/meshkit/cmd/errorutil -d . update --skip-dirs meshery -i ./helpers -o ./helpers
# 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: [email protected]
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: "--signoff"
commit_message: "run error codes utility"
file_pattern: helpers/ **error.go
# to push changes to meshery docs
- name: Checkout meshery
uses: actions/checkout@v4
with:
repository: "meshery/meshery"
# token with write access to meshery repository
token: ${{ secrets.GH_ACCESS_TOKEN }}
path: "meshery"
ref: "master"
- name: Update docs
run: |
echo '{ "errors_export": "" }' | jq --slurpfile export ./helpers/errorutil_errors_export.json '.errors_export = $export[0]' > ./meshery/docs/_data/errorref/istio_errors_export.json
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
repository: ./meshery
commit_user_name: l5io
commit_user_email: [email protected]
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: "--signoff"
commit_message: "[Docs] Error Code Reference: Meshery Adapter for Istio updated"
file_pattern: docs/