mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
fix: 修复资源更新CI取消条件
This commit is contained in:
10
.github/workflows/res-update-game.yml
vendored
10
.github/workflows/res-update-game.yml
vendored
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user