This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
Merge pull request #256 from MUzairS15/schema #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-osm' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
# token here with write access to meshery-osm repo | |
with: | |
token: ${{ secrets.GH_ACCESS_TOKEN }} | |
ref: 'master' | |
- name: Setup Go | |
uses: actions/setup-go@master | |
with: | |
go-version: 1.16.4 | |
- name: Run utility | |
run: | | |
go get github.com/layer5io/meshkit/cmd/errorutil | |
go run github.com/layer5io/meshkit/cmd/errorutil -d . update --skip-dirs meshery -i ./helpers -o ./helpers | |
# to update errorutil* files in meshery-osm 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/ **error.go | |
# to push changes to meshery docs | |
- name: Checkout meshery | |
uses: actions/checkout@master | |
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/osm_errors_export.json | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
repository: ./meshery | |
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: '[Docs] Error Code Reference: Meshery Adapter for OSM updated' | |
file_pattern: docs/ |