From b64ceb41ed903703138db323936f09835032fd2a Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Sun, 20 Apr 2025 21:18:11 +0200 Subject: [PATCH] ci: improve conditions for publish and notify steps in workflow (#844) --- .github/workflows/sunnypilot-build-prebuilt.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sunnypilot-build-prebuilt.yaml b/.github/workflows/sunnypilot-build-prebuilt.yaml index 50c47c510e..156e10515b 100644 --- a/.github/workflows/sunnypilot-build-prebuilt.yaml +++ b/.github/workflows/sunnypilot-build-prebuilt.yaml @@ -206,12 +206,13 @@ jobs: run: | PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/ ${{ github.workspace }}/scripts/manage-powersave.py --enable + publish: concurrency: group: publish-${{ github.head_ref || github.ref_name }} cancel-in-progress: true - if: ${{ !contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt') }} - needs: build + if: ${{ (always() && !failure() && !cancelled()) && (!contains(github.event_name, 'pull_request') || (github.event.action == 'labeled' && github.event.label.name == 'prebuilt')) }} + needs: [ build ] runs-on: ubuntu-24.04 environment: ${{ (contains(fromJSON(vars.AUTO_DEPLOY_PREBUILT_BRANCHES), github.head_ref || github.ref_name) || contains(github.event.pull_request.labels.*.name, 'prebuilt')) && 'auto-deploy' || 'feature-branch' }} steps: @@ -257,7 +258,7 @@ jobs: notify: needs: [ build, publish ] runs-on: ubuntu-24.04 - if: success() + if: ${{ (always() && !failure() && !cancelled()) }} steps: - uses: actions/checkout@v4 - name: Setup Alpine Linux environment