Browse Source

fix action

Nattiden 2 years ago
parent
commit
8c2864c851
2 changed files with 3 additions and 4 deletions
  1. 3 3
      .github/workflows/check_mcversion.yml
  2. 0 1
      Actions/check_mcv.py

+ 3 - 3
.github/workflows/check_mcversion.yml

@@ -26,19 +26,19 @@ jobs:
             printf '● 最新 %s 版: %s %s\n' "$latest_release_type" "$latest_release_id" "$latest_release_act"
             printf '● 最新 %s 版: %s %s\n' "$latest_snapshot_type" "$latest_snapshot_id" "$latest_snapshot_act"
        - name: 配置 Git 信息
-         if: ${{ env.require_update == true }}
+         if: ${{ env.require_update }}
          run: |
             git config --local user.email "[email protected]"
             git config --local user.name "Hilda Bot"
        - name: 配置 GPG 信息
-         if: ${{ env.require_update == true }}
+         if: ${{ env.require_update }}
          uses: crazy-max/ghaction-import-gpg@v6
          with:
             gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
             git_user_signingkey: true
             git_commit_gpgsign: true
        - name: 提交与推送更改
-         if: ${{ env.require_update == true }}
+         if: ${{ env.require_update }}
          run: |
             git add *
             git diff-index --quiet HEAD || git commit -S -m "preloaded new version" && git push

+ 0 - 1
Actions/check_mcv.py

@@ -32,7 +32,6 @@ def update_library(version_libloc:str,ver_type:str,ver_id:str):
     else:
         with open(filepath, "w") as file:
             file.write(INIT_MARKDOWN)
-        require_update = True
         return True,'版本库内未找到,已添加'
 
 try: