diff --git a/.gitea/workflows/build-image.yml b/.gitea/workflows/build-image.yml index 9c79648e..6d51e6fe 100644 --- a/.gitea/workflows/build-image.yml +++ b/.gitea/workflows/build-image.yml @@ -826,8 +826,11 @@ jobs: # Job 3: Auto-deploy to Staging (only for staging branch) deploy-staging: name: Auto-deploy to Staging - needs: [changes] - if: github.ref_name == 'staging' || github.head_ref == 'staging' || (github.ref_name == '' && contains(github.ref, 'staging')) + needs: [changes, build, runtime-base] + if: | + (github.ref_name == 'staging' || github.head_ref == 'staging' || (github.ref_name == '' && contains(github.ref, 'staging'))) && + (needs.build.result == 'success' || needs.build.result == 'skipped') && + (needs.runtime-base.result == 'success' || needs.runtime-base.result == 'skipped') runs-on: ubuntu-latest environment: name: staging