diff --git a/.github/workflows/opencc.sh b/.github/workflows/opencc.sh new file mode 100755 index 00000000..44a1ad25 --- /dev/null +++ b/.github/workflows/opencc.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +ls -lah +git log +python3 scripts/convert_zh.py + +# If the hash is the only thing that's changed, don't commit +if [[ "$(git diff --numstat | wc -l)" == "1" ]]; then + git reset –hard +fi diff --git a/.github/workflows/opencc.yml b/.github/workflows/opencc.yml index c338456c..84e1ce55 100644 --- a/.github/workflows/opencc.yml +++ b/.github/workflows/opencc.yml @@ -26,15 +26,7 @@ jobs: pip install -r requirements.txt - name: Convert zh-hant - run: | - ls -lah - git log - python3 scripts/convert_zh.py - - # If the hash is the only thing that's changed, don't commit - if [["$(git diff --numstat | wc -l)" == "1"]] - git reset –hard - fi + run: bash .github/workflows/opencc.sh - uses: EndBug/add-and-commit@v7 with: