From 66768b3ca7182606d3391b6342143d489e76b2b8 Mon Sep 17 00:00:00 2001 From: Shane Lee Date: Tue, 16 Jul 2024 11:09:28 -0600 Subject: [PATCH] Tie windows installer action into ci.yml --- .github/workflows/ci.yml | 12 ++++++++++++ .github/workflows/nightly.yml | 12 ++++++++++++ .github/workflows/scheduled.yml | 12 ++++++++++++ .github/workflows/staging.yml | 12 ++++++++++++ .github/workflows/templates/build-packages.yml.jinja | 1 + .github/workflows/templates/ci.yml.jinja | 12 ++++++++++++ .github/workflows/templates/layout.yml.jinja | 3 +++ ...tion-windows.yml => windows-installer-action.yml} | 10 ++++------ 8 files changed, 68 insertions(+), 6 deletions(-) rename .github/workflows/{test-installer-action-windows.yml => windows-installer-action.yml} (85%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 207699290786..7bdf4170ad44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,6 +134,9 @@ jobs: - *salt_added_modified - *tests_added_modified - *pkg_tests_added_modified + windows-installer: + - added|modified: + - pkg/windows/** - name: Set up Python 3.10 uses: actions/setup-python@v5 @@ -245,6 +248,12 @@ jobs: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} pre-commit-version: "3.0.4" + windows-installer-check: + name: Windows Installer Check + if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && fromJSON(needs.prepare-workflow.outputs.changed-files)['windows-installer'] }} + uses: ./.github/workflows/windows-installer-action.yml + needs: + - prepare-workflow lint: name: Lint @@ -441,6 +450,7 @@ jobs: needs: - prepare-workflow - build-salt-onedir + - windows-installer-check uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -455,6 +465,7 @@ jobs: needs: - prepare-workflow - build-salt-onedir + - windows-installer-check uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -2130,6 +2141,7 @@ jobs: needs: - prepare-workflow - pre-commit + - windows-installer-check - lint - build-docs - build-deps-onedir diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 93c4c09f55e8..435f6060c50c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -183,6 +183,9 @@ jobs: - *salt_added_modified - *tests_added_modified - *pkg_tests_added_modified + windows-installer: + - added|modified: + - pkg/windows/** - name: Set up Python 3.10 uses: actions/setup-python@v5 @@ -294,6 +297,12 @@ jobs: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} pre-commit-version: "3.0.4" + windows-installer-check: + name: Windows Installer Check + if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && fromJSON(needs.prepare-workflow.outputs.changed-files)['windows-installer'] }} + uses: ./.github/workflows/windows-installer-action.yml + needs: + - prepare-workflow lint: name: Lint @@ -495,6 +504,7 @@ jobs: needs: - prepare-workflow - build-salt-onedir + - windows-installer-check uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -513,6 +523,7 @@ jobs: needs: - prepare-workflow - build-salt-onedir + - windows-installer-check uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -3025,6 +3036,7 @@ jobs: - trigger-branch-nightly-builds - prepare-workflow - pre-commit + - windows-installer-check - lint - build-docs - build-deps-onedir diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 2ab7dc11b6d1..7cb09487032b 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -173,6 +173,9 @@ jobs: - *salt_added_modified - *tests_added_modified - *pkg_tests_added_modified + windows-installer: + - added|modified: + - pkg/windows/** - name: Set up Python 3.10 uses: actions/setup-python@v5 @@ -284,6 +287,12 @@ jobs: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} pre-commit-version: "3.0.4" + windows-installer-check: + name: Windows Installer Check + if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && fromJSON(needs.prepare-workflow.outputs.changed-files)['windows-installer'] }} + uses: ./.github/workflows/windows-installer-action.yml + needs: + - prepare-workflow lint: name: Lint @@ -480,6 +489,7 @@ jobs: needs: - prepare-workflow - build-salt-onedir + - windows-installer-check uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -494,6 +504,7 @@ jobs: needs: - prepare-workflow - build-salt-onedir + - windows-installer-check uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -2171,6 +2182,7 @@ jobs: - trigger-branch-scheduled-builds - prepare-workflow - pre-commit + - windows-installer-check - lint - build-docs - build-deps-onedir diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 1313812f8edb..bacd750547c6 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -164,6 +164,9 @@ jobs: - *salt_added_modified - *tests_added_modified - *pkg_tests_added_modified + windows-installer: + - added|modified: + - pkg/windows/** - name: Set up Python 3.10 uses: actions/setup-python@v5 @@ -284,6 +287,12 @@ jobs: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} changed-files: ${{ needs.prepare-workflow.outputs.changed-files }} pre-commit-version: "3.0.4" + windows-installer-check: + name: Windows Installer Check + if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && fromJSON(needs.prepare-workflow.outputs.changed-files)['windows-installer'] }} + uses: ./.github/workflows/windows-installer-action.yml + needs: + - prepare-workflow lint: name: Lint @@ -480,6 +489,7 @@ jobs: needs: - prepare-workflow - build-salt-onedir + - windows-installer-check uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -498,6 +508,7 @@ jobs: needs: - prepare-workflow - build-salt-onedir + - windows-installer-check uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -3028,6 +3039,7 @@ jobs: - check-requirements - prepare-workflow - pre-commit + - windows-installer-check - lint - build-docs - build-deps-onedir diff --git a/.github/workflows/templates/build-packages.yml.jinja b/.github/workflows/templates/build-packages.yml.jinja index 745bcc3c9ca6..cf64d3d80ac3 100644 --- a/.github/workflows/templates/build-packages.yml.jinja +++ b/.github/workflows/templates/build-packages.yml.jinja @@ -10,6 +10,7 @@ needs: - prepare-workflow - build-salt-onedir + - windows-installer-check uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" diff --git a/.github/workflows/templates/ci.yml.jinja b/.github/workflows/templates/ci.yml.jinja index eef2e77ba846..e323909c45a7 100644 --- a/.github/workflows/templates/ci.yml.jinja +++ b/.github/workflows/templates/ci.yml.jinja @@ -23,6 +23,18 @@ <%- endif %> + <%- set job_name = "windows-installer-check" %> + <%- if includes.get(job_name, True) %> + <{ job_name }>: + <%- do conclusion_needs.append(job_name) %> + name: Windows Installer Check + if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && fromJSON(needs.prepare-workflow.outputs.changed-files)['windows-installer'] }} + uses: ./.github/workflows/windows-installer-action.yml + needs: + - prepare-workflow + + <%- endif %> + <%- set job_name = "lint" %> <%- if includes.get(job_name, True) %> diff --git a/.github/workflows/templates/layout.yml.jinja b/.github/workflows/templates/layout.yml.jinja index 0f0e795c0c63..f832bdca8666 100644 --- a/.github/workflows/templates/layout.yml.jinja +++ b/.github/workflows/templates/layout.yml.jinja @@ -182,6 +182,9 @@ jobs: - *salt_added_modified - *tests_added_modified - *pkg_tests_added_modified + windows-installer: + - added|modified: + - pkg/windows/** - name: Set up Python 3.10 uses: actions/setup-python@v5 diff --git a/.github/workflows/test-installer-action-windows.yml b/.github/workflows/windows-installer-action.yml similarity index 85% rename from .github/workflows/test-installer-action-windows.yml rename to .github/workflows/windows-installer-action.yml index cf0b48556bb9..0b3644bc3a39 100644 --- a/.github/workflows/test-installer-action-windows.yml +++ b/.github/workflows/windows-installer-action.yml @@ -1,13 +1,11 @@ --- -name: Test Windows Installer +name: Windows Installer Check -on: pull_request - -permissions: - contents: read +on: workflow_call jobs: - Test-Windows-Installer: + windows-installer-check: + name: Windows Installer Check runs-on: - windows-latest