Skip to content

Commit 4fad28b

Browse files
committed
ci: update script for pushes auto update docs readme themes and translations
1 parent a1d9c44 commit 4fad28b

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

scripts/push-locale-readme.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
set -x
33
set -e
44

5-
git --version
6-
git config --global user.email "86386385+FajarKim@users.noreply.github.com"
7-
git config --global user.name "Rangga Fajar Oktariansyah"
8-
git config --global --add safe.directory ${GITHUB_WORKSPACE}
9-
git add --all
10-
git commit --message "docs(translation): auto update translation readme"
11-
git remote add master https://${PERSONAL_TOKEN}@github.com/${GH_REPO}.git
12-
git push -f
5+
if [[ "$(git status --porcelain)" != "" ]]; then
6+
git --version
7+
git config --global user.email "86386385+FajarKim@users.noreply.github.com"
8+
git config --global user.name "Rangga Fajar Oktariansyah"
9+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
10+
git add --all
11+
git commit --message "docs(translation): auto update translation readme"
12+
git remote add master https://${PERSONAL_TOKEN}@github.com/${GH_REPO}.git
13+
git push -f
14+
fi

scripts/push-theme-readme.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
set -x
33
set -e
44

5-
git --version
6-
git config --global user.email "86386385+FajarKim@users.noreply.github.com"
7-
git config --global user.name "Rangga Fajar Oktariansyah"
8-
git config --global --add safe.directory ${GITHUB_WORKSPACE}
9-
git add --all
10-
git commit --message "docs(theme): auto update theme readme"
11-
git remote add master https://${PERSONAL_TOKEN}@github.com/${GH_REPO}.git
12-
git push -f
5+
if [[ "$(git status --porcelain)" != "" ]]; then
6+
git --version
7+
git config --global user.email "86386385+FajarKim@users.noreply.github.com"
8+
git config --global user.name "Rangga Fajar Oktariansyah"
9+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
10+
git add --all
11+
git commit --message "docs(theme): auto update theme readme"
12+
git remote add master https://${PERSONAL_TOKEN}@github.com/${GH_REPO}.git
13+
git push -f
14+
fi

0 commit comments

Comments
 (0)