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: