From d1830a3847797cc0ff94bd963c9be2c1760478ad Mon Sep 17 00:00:00 2001 From: isabelle-pundix Date: Sun, 28 Jul 2024 17:16:17 +0800 Subject: [PATCH] update workflow sync with upstream --- .github/workflows/sync-with-upstream.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sync-with-upstream.yml b/.github/workflows/sync-with-upstream.yml index 9fea312..3058951 100644 --- a/.github/workflows/sync-with-upstream.yml +++ b/.github/workflows/sync-with-upstream.yml @@ -28,20 +28,24 @@ jobs: - name: Fetch Upstream Changes run: git fetch upstream - - name: Check for Differences - id: diff + - name: Check for Differences in Tokens Directory and FXList.json + id: check_diff run: | git fetch upstream main - git diff --exit-code upstream/main - continue-on-error: true + git diff --exit-code upstream/main -- Tokens FXList.json || echo "changes" + if [ $? -eq 0 ]; then + echo "::set-output name=changes::false" + else + echo "::set-output name=changes::true" + fi - name: Merge Upstream Changes - if: steps.diff.outcome != 'success' + if: steps.check_diff.outputs.changes == 'true' run: | git merge upstream/main - name: Push Changes - if: steps.diff.outcome != 'success' + if: steps.check_diff.outputs.changes == 'true' run: git push origin main env: GITHUB_TOKEN: ${{ secrets.TOKEN }}