diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41a16f568f9..0cedb6d86bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -233,7 +233,7 @@ jobs: lint: name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow @@ -251,7 +251,7 @@ jobs: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" runs-on: - ubuntu-22.04 - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} needs: - prepare-workflow steps: @@ -358,7 +358,7 @@ jobs: build-docs: name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} needs: - prepare-workflow - build-source-tarball @@ -369,7 +369,7 @@ jobs: build-source-tarball: name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} needs: - prepare-workflow - prepare-release @@ -400,7 +400,7 @@ jobs: build-deps-onedir: name: Build Onedir Dependencies - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} needs: - prepare-workflow uses: ./.github/workflows/build-deps-onedir.yml @@ -414,7 +414,7 @@ jobs: build-salt-onedir: name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} needs: - prepare-workflow - build-deps-onedir @@ -499,7 +499,7 @@ jobs: combine-all-code-coverage: name: Combine Code Coverage - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['skip_code_coverage'] == false }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['skip_code_coverage'] == false }} runs-on: ubuntu-22.04 env: PIP_INDEX_URL: https://pypi.org/simple @@ -629,7 +629,7 @@ jobs: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status - if: always() + if: ${{ !cancelled() && always() }} runs-on: ubuntu-22.04 needs: - prepare-workflow diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 41a576b56ed..997c4aaab94 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -282,7 +282,7 @@ jobs: lint: name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow @@ -300,7 +300,7 @@ jobs: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" runs-on: - ubuntu-22.04 - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} needs: - prepare-workflow steps: @@ -412,7 +412,7 @@ jobs: build-docs: name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} needs: - prepare-workflow - build-source-tarball @@ -423,7 +423,7 @@ jobs: build-source-tarball: name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} needs: - prepare-workflow - prepare-release @@ -454,7 +454,7 @@ jobs: build-deps-onedir: name: Build Onedir Dependencies - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} needs: - prepare-workflow uses: ./.github/workflows/build-deps-onedir.yml @@ -468,7 +468,7 @@ jobs: build-salt-onedir: name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} needs: - prepare-workflow - build-deps-onedir @@ -578,7 +578,7 @@ jobs: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status - if: always() + if: ${{ !cancelled() && always() }} runs-on: ubuntu-22.04 environment: nightly needs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 794ecb486db..e45acebda97 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -422,7 +422,7 @@ jobs: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status - if: always() + if: ${{ !cancelled() && always() }} runs-on: ubuntu-22.04 needs: - check-requirements diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index b3ece2fb1a7..5b22b3ea2e6 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -272,7 +272,7 @@ jobs: lint: name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow @@ -290,7 +290,7 @@ jobs: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" runs-on: - ubuntu-22.04 - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} needs: - prepare-workflow steps: @@ -397,7 +397,7 @@ jobs: build-docs: name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} needs: - prepare-workflow - build-source-tarball @@ -408,7 +408,7 @@ jobs: build-source-tarball: name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} needs: - prepare-workflow - prepare-release @@ -439,7 +439,7 @@ jobs: build-deps-onedir: name: Build Onedir Dependencies - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} needs: - prepare-workflow uses: ./.github/workflows/build-deps-onedir.yml @@ -453,7 +453,7 @@ jobs: build-salt-onedir: name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} needs: - prepare-workflow - build-deps-onedir @@ -539,7 +539,7 @@ jobs: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status - if: always() + if: ${{ !cancelled() && always() }} runs-on: ubuntu-22.04 needs: - workflow-requirements diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 7c091d3a2c2..d46beeaa954 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -272,7 +272,7 @@ jobs: lint: name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['lint'] }} uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow @@ -290,7 +290,7 @@ jobs: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" runs-on: - ubuntu-22.04 - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['prepare-release'] }} needs: - prepare-workflow steps: @@ -398,7 +398,7 @@ jobs: build-docs: name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-docs'] }} needs: - prepare-workflow - build-source-tarball @@ -409,7 +409,7 @@ jobs: build-source-tarball: name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-source-tarball'] }} needs: - prepare-workflow - prepare-release @@ -440,7 +440,7 @@ jobs: build-deps-onedir: name: Build Onedir Dependencies - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-deps-onedir'] }} needs: - prepare-workflow uses: ./.github/workflows/build-deps-onedir.yml @@ -454,7 +454,7 @@ jobs: build-salt-onedir: name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['build-salt-onedir'] }} needs: - prepare-workflow - build-deps-onedir @@ -595,7 +595,7 @@ jobs: publish-pypi: name: Publish to PyPi(test) - if: ${{ inputs.skip-test-pypi-publish != true && github.event.repository.fork != true }} + if: ${{ !cancelled() && inputs.skip-test-pypi-publish != true && github.event.repository.fork != true }} needs: - prepare-workflow - upload-release-artifacts @@ -649,11 +649,10 @@ jobs: draft-release: name: Draft Github Release - if: | - always() && (needs.test.result == 'success' || needs.test.result == 'skipped') && + if: ${{ !cancelled() && (needs.test.result == 'success' || needs.test.result == 'skipped') && (needs.test-packages.result == 'success' || needs.test-packages.result == 'skipped') && needs.prepare-workflow.result == 'success' && needs.build-salt-onedir.result == 'success' && - needs.build-pkgs-onedir.result == 'success' && needs.pre-commit.result == 'success' + needs.build-pkgs-onedir.result == 'success' && needs.pre-commit.result == 'success' }} needs: - prepare-workflow - pre-commit @@ -674,7 +673,7 @@ jobs: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status - if: always() + if: ${{ !cancelled() && always() }} runs-on: ubuntu-22.04 needs: - check-requirements diff --git a/.github/workflows/templates/ci.yml.jinja b/.github/workflows/templates/ci.yml.jinja index 525b4eb6f89..f252c5ba46b 100644 --- a/.github/workflows/templates/ci.yml.jinja +++ b/.github/workflows/templates/ci.yml.jinja @@ -29,7 +29,7 @@ lint: <%- do conclusion_needs.append('lint') %> name: Lint - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} uses: ./.github/workflows/lint-action.yml needs: - prepare-workflow @@ -58,7 +58,7 @@ name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" runs-on: - ubuntu-22.04 - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} needs: - prepare-workflow steps: @@ -185,7 +185,7 @@ <{ job_name }>: <%- do conclusion_needs.append(job_name) %> name: Documentation - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} needs: - prepare-workflow - build-source-tarball @@ -202,7 +202,7 @@ <{ job_name }>: name: Build Source Tarball - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} needs: - prepare-workflow - prepare-release @@ -240,7 +240,7 @@ <{ job_name }>: <%- do conclusion_needs.append(job_name) %> name: Build Onedir Dependencies - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} needs: - prepare-workflow uses: ./.github/workflows/build-deps-onedir.yml @@ -260,7 +260,7 @@ <{ job_name }>: <%- do conclusion_needs.append(job_name) %> name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['jobs']['<{ job_name }>'] }} needs: - prepare-workflow - build-deps-onedir @@ -301,7 +301,7 @@ combine-all-code-coverage: <%- do conclusion_needs.append("combine-all-code-coverage") %> name: Combine Code Coverage - if: ${{ fromJSON(needs.prepare-workflow.outputs.config)['skip_code_coverage'] == false }} + if: ${{ !cancelled() && fromJSON(needs.prepare-workflow.outputs.config)['skip_code_coverage'] == false }} runs-on: ubuntu-22.04 env: PIP_INDEX_URL: https://pypi.org/simple diff --git a/.github/workflows/templates/layout.yml.jinja b/.github/workflows/templates/layout.yml.jinja index 23e8e69e51f..a85b0e64483 100644 --- a/.github/workflows/templates/layout.yml.jinja +++ b/.github/workflows/templates/layout.yml.jinja @@ -313,7 +313,7 @@ jobs: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status - if: always() + if: ${{ !cancelled() && always() }} runs-on: ubuntu-22.04 <%- if workflow_slug == "nightly" %> environment: <{ workflow_slug }> diff --git a/.github/workflows/templates/staging.yml.jinja b/.github/workflows/templates/staging.yml.jinja index c823da809da..2c0b9e0c446 100644 --- a/.github/workflows/templates/staging.yml.jinja +++ b/.github/workflows/templates/staging.yml.jinja @@ -116,7 +116,7 @@ on: publish-pypi: <%- do conclusion_needs.append('publish-pypi') %> name: Publish to PyPi(test) - if: ${{ inputs.skip-test-pypi-publish != true && github.event.repository.fork != true }} + if: ${{ !cancelled() && inputs.skip-test-pypi-publish != true && github.event.repository.fork != true }} needs: - prepare-workflow - upload-release-artifacts @@ -178,11 +178,10 @@ on: draft-release: name: Draft Github Release - if: | - always() && (needs.test.result == 'success' || needs.test.result == 'skipped') && + if: ${{ !cancelled() && (needs.test.result == 'success' || needs.test.result == 'skipped') && (needs.test-packages.result == 'success' || needs.test-packages.result == 'skipped') && needs.prepare-workflow.result == 'success' && needs.build-salt-onedir.result == 'success' && - needs.build-pkgs-onedir.result == 'success' && needs.pre-commit.result == 'success' + needs.build-pkgs-onedir.result == 'success' && needs.pre-commit.result == 'success' }} needs: - prepare-workflow - pre-commit diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 499a43b2c89..7bef19bf189 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -71,7 +71,7 @@ jobs: test-linux: name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} ${{ matrix.transport }}${{ matrix.fips && '(fips)' || '' }}${{ matrix.test-group && ' ' || '' }}${{ matrix.test-group && matrix.test-group || '' }} runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-24.04' || inputs.linux_arm_runner }} - if: toJSON(fromJSON(inputs.matrix)['linux-x86_64']) != '[]' + if: ${{ !cancelled() && toJSON(fromJSON(inputs.matrix)['linux-x86_64']) != '[]' }} # Full test runs. Each chunk should never take more than 2 hours. # Partial test runs(no chunk parallelization), 6 Hours timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }} @@ -382,7 +382,7 @@ jobs: test-linux-arm64: name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} ${{ matrix.transport }}${{ matrix.fips && '(fips)' || '' }}${{ matrix.test-group && ' ' || '' }}${{ matrix.test-group && matrix.test-group || '' }} runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-22.04' || inputs.linux_arm_runner }} - if: toJSON(fromJSON(inputs.matrix)['linux-arm64']) != '[]' + if: ${{ !cancelled() && toJSON(fromJSON(inputs.matrix)['linux-arm64']) != '[]' }} # Full test runs. Each chunk should never take more than 2 hours. # Partial test runs(no chunk parallelization), 6 Hours timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }} @@ -701,7 +701,7 @@ jobs: runs-on: ${{ matrix.runner }} # Full test runs. Each chunk should never take more than 2 hours. # Partial test runs(no chunk parallelization), 6 Hours - if: toJSON(fromJSON(inputs.matrix)['macos']) != '[]' + if: ${{ !cancelled() && toJSON(fromJSON(inputs.matrix)['macos']) != '[]' }} timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }} strategy: fail-fast: false @@ -978,7 +978,7 @@ jobs: test-windows: name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} ${{ matrix.transport }}${{ matrix.test-group && ' ' || '' }}${{ matrix.test-group && matrix.test-group || '' }} - if: toJSON(fromJSON(inputs.matrix)['windows']) != '[]' + if: ${{ !cancelled() && toJSON(fromJSON(inputs.matrix)['windows']) != '[]' }} runs-on: ${{ matrix.slug }} # Full test runs. Each chunk should never take more than 2 hours. # Partial test runs(no chunk parallelization), 6 Hours diff --git a/.github/workflows/test-packages-action.yml b/.github/workflows/test-packages-action.yml index ed41b1e787a..467f1a396c9 100644 --- a/.github/workflows/test-packages-action.yml +++ b/.github/workflows/test-packages-action.yml @@ -65,7 +65,7 @@ jobs: test-linux: name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-24.04' || inputs.linux_arm_runner }} - if: ${{ toJSON(fromJSON(inputs.matrix)['linux']) != '[]' }} + if: ${{ !cancelled() && toJSON(fromJSON(inputs.matrix)['linux']) != '[]' }} timeout-minutes: 120 # 2 Hours - More than this and something is wrong strategy: fail-fast: false @@ -192,7 +192,7 @@ jobs: test-macos: name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} runs-on: ${{ matrix.runner }} - if: ${{ toJSON(fromJSON(inputs.matrix)['macos']) != '[]' }} + if: ${{ !cancelled() && toJSON(fromJSON(inputs.matrix)['macos']) != '[]' }} timeout-minutes: 150 # 2 & 1/2 Hours - More than this and something is wrong (MacOS needs a little more time) strategy: fail-fast: false @@ -311,7 +311,7 @@ jobs: name: ${{ matrix.display_name }} ${{ matrix.tests-chunk }} runs-on: ${{ matrix.slug }} timeout-minutes: 120 # 2 Hours - More than this and something is wrong - if: ${{ toJSON(fromJSON(inputs.matrix)['windows']) != '[]' }} + if: ${{ !cancelled() && toJSON(fromJSON(inputs.matrix)['windows']) != '[]' }} strategy: fail-fast: false matrix: