Skip to content

Commit 3fd2aad

Browse files
authored
Merge pull request #190 from iamsdas/errorcode
[CI] fix creation of commits in error codes utility workflow
2 parents 77e54fe + bf9ae28 commit 3fd2aad

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

.github/workflows/error-codes-updater.yaml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
3838
commit_options: '--signoff'
3939
commit_message: 'run error codes utility'
40-
file_pattern: helpers/ **.go
40+
file_pattern: helpers/ **error.go
4141

4242
# to push changes to meshery docs
4343
- name: Checkout meshery
@@ -49,18 +49,17 @@ jobs:
4949
path: 'meshery'
5050
ref: 'master'
5151

52-
- name: Update and push docs
52+
- name: Update docs
5353
run: |
5454
echo '{ "errors_export": "" }' | jq --slurpfile export ./helpers/errorutil_errors_export.json '.errors_export = $export[0]' > ./meshery/docs/_data/errorref/consul_errors_export.json
5555
56-
cd ./meshery
57-
git config user.name l5io
58-
git config user.email [email protected]
59-
if git diff --exit-code --quiet
60-
then
61-
echo "No changes to commit"
62-
exit
63-
fi
64-
git add ./docs/_data/errorref/consul_errors_export.json
65-
git commit -m "[Docs] Error Code Reference: Updated codes for Consul adapter" --signoff
66-
git push origin master
56+
- name: Commit changes
57+
uses: stefanzweifel/git-auto-commit-action@v4
58+
with:
59+
repository: ./meshery
60+
commit_user_name: l5io
61+
commit_user_email: [email protected]
62+
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
63+
commit_options: '--signoff'
64+
commit_message: '[Docs] Error Code Reference: Meshery Adapter for Consul updated'
65+
file_pattern: docs/

0 commit comments

Comments
 (0)