From b2d38791080f47ca3bd78dc4ff7eca1f8ef2f6a8 Mon Sep 17 00:00:00 2001 From: MistEO Date: Sun, 28 May 2023 15:35:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=9B=B4=E6=96=B0CI=E5=8F=96=E6=B6=88=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/res-update-game.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/res-update-game.yml b/.github/workflows/res-update-game.yml index 65ca5313b8..f9c002f08e 100644 --- a/.github/workflows/res-update-game.yml +++ b/.github/workflows/res-update-game.yml @@ -78,24 +78,24 @@ jobs: $commit_msg = "chore: Auto Update Game Resources - $(Get-Date -Format 'yyyy-MM-dd')" } git commit -m "$commit_msg" - if ($LASTEXITCODE) { - echo "have_commits=False" >> $env:GITHUB_OUTPUT + if ($LASTEXITCODE -eq 0) { + echo "have_commits=True" >> $env:GITHUB_OUTPUT } git pull origin $(git rev-parse --abbrev-ref HEAD) --unshallow --rebase - name: Cancelling - if: steps.add_files.outputs.have_commits == 'False' + if: steps.add_files.outputs.have_commits != 'True' uses: andymckay/cancel-action@0.3 - name: Push changes # push the output folder to your repo - if: steps.add_files.outputs.have_commits != 'False' + if: steps.add_files.outputs.have_commits == 'True' uses: ad-m/github-push-action@master with: github_token: ${{ secrets.MISTEOWORKFLOW }} - name: Release # ref: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow - if: steps.add_files.outputs.have_commits != 'False' + if: steps.add_files.outputs.have_commits == 'True' run: | gh workflow run release-nightly-ota -f release_body="Auto Release of Resource Updates" env: