From e3c6b17e638ac8a9aeab4d5852e5909b049c5ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=A2=E7=B4=A0=E5=8F=A2=E9=9B=86=E3=83=BB=E3=81=90?= =?UTF-8?q?=E3=82=89=E3=81=B5=E3=81=83=E3=83=BC=E3=82=80?= Date: Tue, 12 Sep 2023 02:25:45 +0800 Subject: [PATCH] Fix Workflow --- .github/workflows/fetch-upstream.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/fetch-upstream.yml b/.github/workflows/fetch-upstream.yml index 48880c80..e4812168 100644 --- a/.github/workflows/fetch-upstream.yml +++ b/.github/workflows/fetch-upstream.yml @@ -9,7 +9,7 @@ jobs: update: runs-on: ubuntu-latest env: - UPSTREAM_DIR: ../rime-cantonese-upstream + UPSTREAM_DIR: ./rime-cantonese-upstream steps: - name: Checkout uses: actions/checkout@v3 @@ -18,18 +18,18 @@ jobs: with: repository: CanCLID/rime-cantonese-upstream path: ${{ env.UPSTREAM_DIR }} - - name: Install dependencies + - name: Install Dependencies run: | python -m pip install -U pip python -m pip install pytz - - name: Fetch upstream + - name: Rebuild Dictionary from Upstream run: | - python scripts/fetch_upstream.py "$UPSTREAM_DIR" # rebuild dictionary + python scripts/fetch_upstream.py "$UPSTREAM_DIR" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config user.name "github-actions[bot]" git config diff.notimestamp.textconv 'sed "/^version:/d"' echo "*.dict.yaml diff=notimestamp" > .gitattributes - git add . + git add "*.dict.yaml" if [ -n "$(git diff)" ]; then # Push to GitHub if contents changed UPSTREAM_SHA=$(git -C "$UPSTREAM_DIR" rev-parse HEAD) git commit -m "Update from upstream https://github.com/CanCLID/rime-cantonese-upstream/commit/$UPSTREAM_SHA"