From 68da9a862aa1bd1b3878f9f1e31521d266688aa8 Mon Sep 17 00:00:00 2001 From: WuTofu Date: Wed, 31 Aug 2022 22:52:15 +0800 Subject: [PATCH] Reorder steps --- .github/workflows/auto_newversion.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/auto_newversion.yml b/.github/workflows/auto_newversion.yml index 862e5e6..b31050e 100644 --- a/.github/workflows/auto_newversion.yml +++ b/.github/workflows/auto_newversion.yml @@ -18,16 +18,26 @@ jobs: with: python-version: "3.x" - - name: Run AutoBuild + - name: Set up Git config run: | - cd ${{ github.workspace }}/AutoBuild - python pure_domain.py + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" - id: files uses: jitterbit/get-changed-files@v1 with: format: "csv" + - name: Run AutoBuild + run: | + cd ${{ github.workspace }}/AutoBuild + python pure_domain.py + + - name: Commit files modified by "AutoBuild" step + run: | + git add domains.txt + git commit -m "🤖 自動更新 domains.txt" || echo "[INFO] Fail to commit domains.txt, may not need to update the file?" + - name: Run AutoUpdateVerNum run: | cd ${{ github.workspace }}/AutoBuild @@ -36,14 +46,10 @@ jobs: python auto_update_version.py ${added_modified_file} done - - name: Commit files + - name: Commit files modified by "AutoUpdateVerNum" step run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add domains.txt - git commit -m "🤖 自動更新 domains.txt" || echo "[INFO] Fail to commit domains.txt, may not need to update the file?" git add *.txt - git commit -m "🤖 自動更新 版本號" + git commit -m "🤖 自動更新 版本號" || echo "[INFO] Fail to update version number, may not need to update at all?" - name: Push changes uses: ad-m/github-push-action@master