diff --git a/.github/workflows/sunnypilot-build-model.yaml b/.github/workflows/sunnypilot-build-model.yaml index bc4bd4f4a..b01a7a062 100644 --- a/.github/workflows/sunnypilot-build-model.yaml +++ b/.github/workflows/sunnypilot-build-model.yaml @@ -14,6 +14,10 @@ on: required: true default: 'master' type: string + custom_name: + description: 'Custom name for the model' + required: false + type: string jobs: build_model: @@ -32,11 +36,11 @@ jobs: uses: actions/cache@v4 with: path: ${{env.SCONS_CACHE_DIR}} - key: scons-${{ runner.os }}-${{ runner.arch }}-${{ github.ref_name }}-model-${{ github.head_ref }}-${{ github.sha }} + key: scons-${{ runner.os }}-${{ runner.arch }}-${{ github.head_ref || github.ref_name }}-model-${{ github.sha }} restore-keys: | - scons-${{ runner.os }}-${{ runner.arch }}-${{ github.ref_name }}-model-${{ github.head_ref }} - scons-${{ runner.os }}-${{ runner.arch }}-${{ github.ref_name }}-model - scons-${{ runner.os }}-${{ runner.arch }}-${{ github.ref_name }} + scons-${{ runner.os }}-${{ runner.arch }}-${{ github.head_ref || github.ref_name }}-model-${{ github.sha }} + scons-${{ runner.os }}-${{ runner.arch }}-${{ github.head_ref || github.ref_name }}-model + scons-${{ runner.os }}-${{ runner.arch }}-${{ github.head_ref || github.ref_name }} scons-${{ runner.os }}-${{ runner.arch }}-master-new scons-${{ runner.os }}-${{ runner.arch }}-master scons-${{ runner.os }}-${{ runner.arch }} @@ -78,5 +82,5 @@ jobs: - name: Upload Build Artifacts uses: actions/upload-artifact@v4 with: - name: model-${{ github.event.inputs.upstream_branch }}-${{ github.run_number }} - path: ${{ env.OUTPUT_DIR }} \ No newline at end of file + name: model-${{ github.event.inputs.custom_name || github.event.inputs.upstream_branch }}-${{ github.run_number }} + path: ${{ env.OUTPUT_DIR }} diff --git a/.github/workflows/sunnypilot-build-prebuilt.yaml b/.github/workflows/sunnypilot-build-prebuilt.yaml index 04556e3a4..367f292e0 100644 --- a/.github/workflows/sunnypilot-build-prebuilt.yaml +++ b/.github/workflows/sunnypilot-build-prebuilt.yaml @@ -191,6 +191,7 @@ jobs: concurrency: group: publish-${{ github.head_ref || github.ref_name }} cancel-in-progress: true + if: ${{ github.event_name != 'pull_request' || github.event_name == 'pull_request' && github.event.pull_request.draft }} needs: build runs-on: ubuntu-24.04 environment: ${{ contains(fromJSON(vars.AUTO_DEPLOY_PREBUILT_BRANCHES), github.head_ref || github.ref_name) && 'auto-deploy' || 'feature-branch' }} @@ -237,6 +238,7 @@ jobs: notify: needs: [ build, publish ] runs-on: ubuntu-24.04 + if: success() steps: - uses: actions/checkout@v4 - name: Setup Alpine Linux environment