From a592f71173a234dab1f98f860da196fecbfdd326 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 12 Aug 2025 12:50:52 +0100 Subject: [PATCH] Allow inputs for `workflow_*` events, and propagate them through collections --- .github/workflows/__all-platform-bundle.yml | 6 ++-- .github/workflows/__analyze-ref-input.yml | 6 ++-- .github/workflows/__autobuild-action.yml | 6 ++-- ...obuild-direct-tracing-with-working-dir.yml | 6 ++-- .../workflows/__autobuild-direct-tracing.yml | 6 ++-- .github/workflows/__build-mode-autobuild.yml | 6 ++-- .github/workflows/__build-mode-manual.yml | 6 ++-- .github/workflows/__build-mode-none.yml | 6 ++-- .github/workflows/__build-mode-rollback.yml | 6 ++-- .github/workflows/__bundle-toolcache.yml | 6 ++-- .github/workflows/__bundle-zstd.yml | 6 ++-- .../workflows/__cleanup-db-cluster-dir.yml | 6 ++-- .github/workflows/__config-export.yml | 6 ++-- .github/workflows/__config-input.yml | 6 ++-- .github/workflows/__cpp-deptrace-disabled.yml | 6 ++-- .../__cpp-deptrace-enabled-on-macos.yml | 6 ++-- .github/workflows/__cpp-deptrace-enabled.yml | 6 ++-- .github/workflows/__diagnostics-export.yml | 6 ++-- .../__export-file-baseline-information.yml | 6 ++-- .github/workflows/__extractor-ram-threads.yml | 6 ++-- .github/workflows/__go-custom-queries.yml | 16 +++++++-- ...indirect-tracing-workaround-diagnostic.yml | 16 +++++++-- ...ect-tracing-workaround-no-file-program.yml | 16 +++++++-- .../__go-indirect-tracing-workaround.yml | 16 +++++++-- .../workflows/__go-tracing-autobuilder.yml | 16 +++++++-- .../__go-tracing-custom-build-steps.yml | 16 +++++++-- .../__go-tracing-legacy-workflow.yml | 16 +++++++-- .github/workflows/__go.yml | 21 +++++++++++- .github/workflows/__init-with-registries.yml | 6 ++-- .../workflows/__javascript-source-root.yml | 6 ++-- .github/workflows/__job-run-uuid-sarif.yml | 6 ++-- .github/workflows/__language-aliases.yml | 6 ++-- .../workflows/__multi-language-autodetect.yml | 6 ++-- .github/workflows/__overlay-init-fallback.yml | 6 ++-- ...ackaging-codescanning-config-inputs-js.yml | 6 ++-- .../__packaging-config-inputs-js.yml | 6 ++-- .github/workflows/__packaging-config-js.yml | 6 ++-- .github/workflows/__packaging-inputs-js.yml | 6 ++-- .github/workflows/__quality-queries.yml | 6 ++-- .github/workflows/__remote-config.yml | 6 ++-- .../__resolve-environment-action.yml | 6 ++-- .../workflows/__rubocop-multi-language.yml | 6 ++-- .github/workflows/__ruby.yml | 6 ++-- .github/workflows/__rust.yml | 6 ++-- .github/workflows/__split-workflow.yml | 6 ++-- .github/workflows/__start-proxy.yml | 6 ++-- .github/workflows/__submit-sarif-failure.yml | 6 ++-- .github/workflows/__swift-autobuild.yml | 6 ++-- .github/workflows/__swift-custom-build.yml | 6 ++-- .../__test-autobuild-working-dir.yml | 6 ++-- .github/workflows/__test-local-codeql.yml | 6 ++-- .github/workflows/__test-proxy.yml | 6 ++-- .github/workflows/__unset-environment.yml | 6 ++-- .github/workflows/__upload-quality-sarif.yml | 6 ++-- .github/workflows/__upload-ref-sha-input.yml | 6 ++-- .github/workflows/__with-checkout-path.yml | 6 ++-- pr-checks/checks/go-custom-queries.yml | 5 +++ ...indirect-tracing-workaround-diagnostic.yml | 7 +++- ...ect-tracing-workaround-no-file-program.yml | 7 +++- .../checks/go-indirect-tracing-workaround.yml | 7 +++- pr-checks/checks/go-tracing-autobuilder.yml | 5 +++ .../checks/go-tracing-custom-build-steps.yml | 5 +++ .../checks/go-tracing-legacy-workflow.yml | 5 +++ pr-checks/sync.py | 34 ++++++++++++++++--- 64 files changed, 371 insertions(+), 125 deletions(-) diff --git a/.github/workflows/__all-platform-bundle.yml b/.github/workflows/__all-platform-bundle.yml index e9b9a0c24..9686e1e93 100644 --- a/.github/workflows/__all-platform-bundle.yml +++ b/.github/workflows/__all-platform-bundle.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: all-platform-bundle: strategy: diff --git a/.github/workflows/__analyze-ref-input.yml b/.github/workflows/__analyze-ref-input.yml index e374f4a63..e094376da 100644 --- a/.github/workflows/__analyze-ref-input.yml +++ b/.github/workflows/__analyze-ref-input.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: analyze-ref-input: strategy: diff --git a/.github/workflows/__autobuild-action.yml b/.github/workflows/__autobuild-action.yml index 47bf7ef69..aebf70fb2 100644 --- a/.github/workflows/__autobuild-action.yml +++ b/.github/workflows/__autobuild-action.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: autobuild-action: strategy: diff --git a/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml b/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml index 6090b0c9d..325d8c2d9 100644 --- a/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml +++ b/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: autobuild-direct-tracing-with-working-dir: strategy: diff --git a/.github/workflows/__autobuild-direct-tracing.yml b/.github/workflows/__autobuild-direct-tracing.yml index c3714b8aa..882174eab 100644 --- a/.github/workflows/__autobuild-direct-tracing.yml +++ b/.github/workflows/__autobuild-direct-tracing.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: autobuild-direct-tracing: strategy: diff --git a/.github/workflows/__build-mode-autobuild.yml b/.github/workflows/__build-mode-autobuild.yml index 5417c3392..f421721b6 100644 --- a/.github/workflows/__build-mode-autobuild.yml +++ b/.github/workflows/__build-mode-autobuild.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: build-mode-autobuild: strategy: diff --git a/.github/workflows/__build-mode-manual.yml b/.github/workflows/__build-mode-manual.yml index a8c94e9e6..7461d160f 100644 --- a/.github/workflows/__build-mode-manual.yml +++ b/.github/workflows/__build-mode-manual.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: build-mode-manual: strategy: diff --git a/.github/workflows/__build-mode-none.yml b/.github/workflows/__build-mode-none.yml index 30f6e6d63..5f649b972 100644 --- a/.github/workflows/__build-mode-none.yml +++ b/.github/workflows/__build-mode-none.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: build-mode-none: strategy: diff --git a/.github/workflows/__build-mode-rollback.yml b/.github/workflows/__build-mode-rollback.yml index a669e7645..581f78538 100644 --- a/.github/workflows/__build-mode-rollback.yml +++ b/.github/workflows/__build-mode-rollback.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: build-mode-rollback: strategy: diff --git a/.github/workflows/__bundle-toolcache.yml b/.github/workflows/__bundle-toolcache.yml index da86b46b6..7d9becc00 100644 --- a/.github/workflows/__bundle-toolcache.yml +++ b/.github/workflows/__bundle-toolcache.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: bundle-toolcache: strategy: diff --git a/.github/workflows/__bundle-zstd.yml b/.github/workflows/__bundle-zstd.yml index 5af1279eb..650a8617d 100644 --- a/.github/workflows/__bundle-zstd.yml +++ b/.github/workflows/__bundle-zstd.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: bundle-zstd: strategy: diff --git a/.github/workflows/__cleanup-db-cluster-dir.yml b/.github/workflows/__cleanup-db-cluster-dir.yml index f149887c2..037f0dfd6 100644 --- a/.github/workflows/__cleanup-db-cluster-dir.yml +++ b/.github/workflows/__cleanup-db-cluster-dir.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: cleanup-db-cluster-dir: strategy: diff --git a/.github/workflows/__config-export.yml b/.github/workflows/__config-export.yml index 6e30bd006..b3af26b4f 100644 --- a/.github/workflows/__config-export.yml +++ b/.github/workflows/__config-export.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: config-export: strategy: diff --git a/.github/workflows/__config-input.yml b/.github/workflows/__config-input.yml index e5f7f8072..aa150be8a 100644 --- a/.github/workflows/__config-input.yml +++ b/.github/workflows/__config-input.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: config-input: strategy: diff --git a/.github/workflows/__cpp-deptrace-disabled.yml b/.github/workflows/__cpp-deptrace-disabled.yml index b93e35bc2..3e8c79a8b 100644 --- a/.github/workflows/__cpp-deptrace-disabled.yml +++ b/.github/workflows/__cpp-deptrace-disabled.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: cpp-deptrace-disabled: strategy: diff --git a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml index 62b5622d4..5995ab945 100644 --- a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml +++ b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: cpp-deptrace-enabled-on-macos: strategy: diff --git a/.github/workflows/__cpp-deptrace-enabled.yml b/.github/workflows/__cpp-deptrace-enabled.yml index 94c357db6..623244a57 100644 --- a/.github/workflows/__cpp-deptrace-enabled.yml +++ b/.github/workflows/__cpp-deptrace-enabled.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: cpp-deptrace-enabled: strategy: diff --git a/.github/workflows/__diagnostics-export.yml b/.github/workflows/__diagnostics-export.yml index 55df10c37..e07aa5e96 100644 --- a/.github/workflows/__diagnostics-export.yml +++ b/.github/workflows/__diagnostics-export.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: diagnostics-export: strategy: diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index 1784a821b..1c4424159 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: export-file-baseline-information: strategy: diff --git a/.github/workflows/__extractor-ram-threads.yml b/.github/workflows/__extractor-ram-threads.yml index 755dd7b11..212187b2e 100644 --- a/.github/workflows/__extractor-ram-threads.yml +++ b/.github/workflows/__extractor-ram-threads.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: extractor-ram-threads: strategy: diff --git a/.github/workflows/__go-custom-queries.yml b/.github/workflows/__go-custom-queries.yml index e3af1534e..b72c8cfdf 100644 --- a/.github/workflows/__go-custom-queries.yml +++ b/.github/workflows/__go-custom-queries.yml @@ -20,8 +20,18 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: true + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: true jobs: go-custom-queries: strategy: @@ -51,7 +61,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '>=1.21.0' + go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - uses: ./../action/init with: diff --git a/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml b/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml index 29c1dcd16..8e07fb91a 100644 --- a/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml +++ b/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml @@ -20,8 +20,18 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: true + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: true jobs: go-indirect-tracing-workaround-diagnostic: strategy: @@ -49,7 +59,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '>=1.21.0' + go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - uses: ./../action/init with: diff --git a/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml b/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml index bea199c62..fd0a8a6c8 100644 --- a/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml +++ b/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml @@ -20,8 +20,18 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: true + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: true jobs: go-indirect-tracing-workaround-no-file-program: strategy: @@ -49,7 +59,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '>=1.21.0' + go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - name: Remove `file` program run: | diff --git a/.github/workflows/__go-indirect-tracing-workaround.yml b/.github/workflows/__go-indirect-tracing-workaround.yml index 021bee531..f6fd460a8 100644 --- a/.github/workflows/__go-indirect-tracing-workaround.yml +++ b/.github/workflows/__go-indirect-tracing-workaround.yml @@ -20,8 +20,18 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: true + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: true jobs: go-indirect-tracing-workaround: strategy: @@ -49,7 +59,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '>=1.21.0' + go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - uses: ./../action/init with: diff --git a/.github/workflows/__go-tracing-autobuilder.yml b/.github/workflows/__go-tracing-autobuilder.yml index 8b96dc44b..8590ea26f 100644 --- a/.github/workflows/__go-tracing-autobuilder.yml +++ b/.github/workflows/__go-tracing-autobuilder.yml @@ -20,8 +20,18 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: true + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: true jobs: go-tracing-autobuilder: strategy: @@ -79,7 +89,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '>=1.21.0' + go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - uses: ./../action/init with: diff --git a/.github/workflows/__go-tracing-custom-build-steps.yml b/.github/workflows/__go-tracing-custom-build-steps.yml index bb11a464f..b27c5af5e 100644 --- a/.github/workflows/__go-tracing-custom-build-steps.yml +++ b/.github/workflows/__go-tracing-custom-build-steps.yml @@ -20,8 +20,18 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: true + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: true jobs: go-tracing-custom-build-steps: strategy: @@ -79,7 +89,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '>=1.21.0' + go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - uses: ./../action/init with: diff --git a/.github/workflows/__go-tracing-legacy-workflow.yml b/.github/workflows/__go-tracing-legacy-workflow.yml index 2f7149047..1c3ef823e 100644 --- a/.github/workflows/__go-tracing-legacy-workflow.yml +++ b/.github/workflows/__go-tracing-legacy-workflow.yml @@ -20,8 +20,18 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: true + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: true jobs: go-tracing-legacy-workflow: strategy: @@ -79,7 +89,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '>=1.21.0' + go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - uses: ./../action/init with: diff --git a/.github/workflows/__go.yml b/.github/workflows/__go.yml index 4a658abea..ea2f1b1d8 100644 --- a/.github/workflows/__go.yml +++ b/.github/workflows/__go.yml @@ -11,7 +11,12 @@ on: push: paths: - .github/workflows/__go.yml - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: true jobs: go-custom-queries: name: 'Go: Custom queries' @@ -19,39 +24,53 @@ jobs: contents: read security-events: read uses: ./.github/workflows/__go-custom-queries.yml + with: + go-version: ${{ inputs.go-version }} go-tracing-legacy-workflow: name: 'Go: tracing with legacy workflow' permissions: contents: read security-events: read uses: ./.github/workflows/__go-tracing-legacy-workflow.yml + with: + go-version: ${{ inputs.go-version }} go-indirect-tracing-workaround: name: 'Go: workaround for indirect tracing' permissions: contents: read security-events: read uses: ./.github/workflows/__go-indirect-tracing-workaround.yml + with: + go-version: ${{ inputs.go-version }} go-tracing-custom-build-steps: name: 'Go: tracing with custom build steps' permissions: contents: read security-events: read uses: ./.github/workflows/__go-tracing-custom-build-steps.yml + with: + go-version: ${{ inputs.go-version }} go-tracing-autobuilder: name: 'Go: tracing with autobuilder step' permissions: contents: read security-events: read uses: ./.github/workflows/__go-tracing-autobuilder.yml + with: + go-version: ${{ inputs.go-version }} go-indirect-tracing-workaround-diagnostic: name: 'Go: diagnostic when Go is changed after init step' permissions: contents: read security-events: read uses: ./.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml + with: + go-version: ${{ inputs.go-version }} go-indirect-tracing-workaround-no-file-program: name: 'Go: diagnostic when `file` is not installed' permissions: contents: read security-events: read uses: ./.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml + with: + go-version: ${{ inputs.go-version }} diff --git a/.github/workflows/__init-with-registries.yml b/.github/workflows/__init-with-registries.yml index ae57fd781..c0396cefa 100644 --- a/.github/workflows/__init-with-registries.yml +++ b/.github/workflows/__init-with-registries.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: init-with-registries: strategy: diff --git a/.github/workflows/__javascript-source-root.yml b/.github/workflows/__javascript-source-root.yml index f4f9bcaa7..c8bdfee62 100644 --- a/.github/workflows/__javascript-source-root.yml +++ b/.github/workflows/__javascript-source-root.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: javascript-source-root: strategy: diff --git a/.github/workflows/__job-run-uuid-sarif.yml b/.github/workflows/__job-run-uuid-sarif.yml index b0939ca5e..599f21d23 100644 --- a/.github/workflows/__job-run-uuid-sarif.yml +++ b/.github/workflows/__job-run-uuid-sarif.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: job-run-uuid-sarif: strategy: diff --git a/.github/workflows/__language-aliases.yml b/.github/workflows/__language-aliases.yml index 6c2037a1e..629967aee 100644 --- a/.github/workflows/__language-aliases.yml +++ b/.github/workflows/__language-aliases.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: language-aliases: strategy: diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index a289aab4c..9c8b82fc6 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: multi-language-autodetect: strategy: diff --git a/.github/workflows/__overlay-init-fallback.yml b/.github/workflows/__overlay-init-fallback.yml index 76824d20d..ea40f4df1 100644 --- a/.github/workflows/__overlay-init-fallback.yml +++ b/.github/workflows/__overlay-init-fallback.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: overlay-init-fallback: strategy: diff --git a/.github/workflows/__packaging-codescanning-config-inputs-js.yml b/.github/workflows/__packaging-codescanning-config-inputs-js.yml index 0e72f6300..d65d542eb 100644 --- a/.github/workflows/__packaging-codescanning-config-inputs-js.yml +++ b/.github/workflows/__packaging-codescanning-config-inputs-js.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: packaging-codescanning-config-inputs-js: strategy: diff --git a/.github/workflows/__packaging-config-inputs-js.yml b/.github/workflows/__packaging-config-inputs-js.yml index 4ffc1cbad..61a58b74e 100644 --- a/.github/workflows/__packaging-config-inputs-js.yml +++ b/.github/workflows/__packaging-config-inputs-js.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: packaging-config-inputs-js: strategy: diff --git a/.github/workflows/__packaging-config-js.yml b/.github/workflows/__packaging-config-js.yml index 984b41d53..022eb3bf5 100644 --- a/.github/workflows/__packaging-config-js.yml +++ b/.github/workflows/__packaging-config-js.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: packaging-config-js: strategy: diff --git a/.github/workflows/__packaging-inputs-js.yml b/.github/workflows/__packaging-inputs-js.yml index 88ebcd26e..0e222c170 100644 --- a/.github/workflows/__packaging-inputs-js.yml +++ b/.github/workflows/__packaging-inputs-js.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: packaging-inputs-js: strategy: diff --git a/.github/workflows/__quality-queries.yml b/.github/workflows/__quality-queries.yml index 0f0b3b971..1260241cb 100644 --- a/.github/workflows/__quality-queries.yml +++ b/.github/workflows/__quality-queries.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: quality-queries: strategy: diff --git a/.github/workflows/__remote-config.yml b/.github/workflows/__remote-config.yml index d6f68f1e6..2128c1ed0 100644 --- a/.github/workflows/__remote-config.yml +++ b/.github/workflows/__remote-config.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: remote-config: strategy: diff --git a/.github/workflows/__resolve-environment-action.yml b/.github/workflows/__resolve-environment-action.yml index a8a96a8e8..ef130ffa1 100644 --- a/.github/workflows/__resolve-environment-action.yml +++ b/.github/workflows/__resolve-environment-action.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: resolve-environment-action: strategy: diff --git a/.github/workflows/__rubocop-multi-language.yml b/.github/workflows/__rubocop-multi-language.yml index 87d8657a8..ce12958b8 100644 --- a/.github/workflows/__rubocop-multi-language.yml +++ b/.github/workflows/__rubocop-multi-language.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: rubocop-multi-language: strategy: diff --git a/.github/workflows/__ruby.yml b/.github/workflows/__ruby.yml index a50d95b38..f389cd7b3 100644 --- a/.github/workflows/__ruby.yml +++ b/.github/workflows/__ruby.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: ruby: strategy: diff --git a/.github/workflows/__rust.yml b/.github/workflows/__rust.yml index 8ca1dde8e..f7470fd27 100644 --- a/.github/workflows/__rust.yml +++ b/.github/workflows/__rust.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: rust: strategy: diff --git a/.github/workflows/__split-workflow.yml b/.github/workflows/__split-workflow.yml index c0de23900..b3a430c96 100644 --- a/.github/workflows/__split-workflow.yml +++ b/.github/workflows/__split-workflow.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: split-workflow: strategy: diff --git a/.github/workflows/__start-proxy.yml b/.github/workflows/__start-proxy.yml index 0287f0c69..b6c23dfb7 100644 --- a/.github/workflows/__start-proxy.yml +++ b/.github/workflows/__start-proxy.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: start-proxy: strategy: diff --git a/.github/workflows/__submit-sarif-failure.yml b/.github/workflows/__submit-sarif-failure.yml index 7e0036a7e..c89b63d2c 100644 --- a/.github/workflows/__submit-sarif-failure.yml +++ b/.github/workflows/__submit-sarif-failure.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: submit-sarif-failure: strategy: diff --git a/.github/workflows/__swift-autobuild.yml b/.github/workflows/__swift-autobuild.yml index f9d6e7f68..7dd3afec2 100644 --- a/.github/workflows/__swift-autobuild.yml +++ b/.github/workflows/__swift-autobuild.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: swift-autobuild: strategy: diff --git a/.github/workflows/__swift-custom-build.yml b/.github/workflows/__swift-custom-build.yml index ea645a578..d14bfd0eb 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: swift-custom-build: strategy: diff --git a/.github/workflows/__test-autobuild-working-dir.yml b/.github/workflows/__test-autobuild-working-dir.yml index ccf26b688..dc4d01917 100644 --- a/.github/workflows/__test-autobuild-working-dir.yml +++ b/.github/workflows/__test-autobuild-working-dir.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: test-autobuild-working-dir: strategy: diff --git a/.github/workflows/__test-local-codeql.yml b/.github/workflows/__test-local-codeql.yml index d8d3ee677..4f92de612 100644 --- a/.github/workflows/__test-local-codeql.yml +++ b/.github/workflows/__test-local-codeql.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: test-local-codeql: strategy: diff --git a/.github/workflows/__test-proxy.yml b/.github/workflows/__test-proxy.yml index 796ed3974..d2f9b3533 100644 --- a/.github/workflows/__test-proxy.yml +++ b/.github/workflows/__test-proxy.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: test-proxy: strategy: diff --git a/.github/workflows/__unset-environment.yml b/.github/workflows/__unset-environment.yml index 6e6c08ac9..83d758ab2 100644 --- a/.github/workflows/__unset-environment.yml +++ b/.github/workflows/__unset-environment.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: unset-environment: strategy: diff --git a/.github/workflows/__upload-quality-sarif.yml b/.github/workflows/__upload-quality-sarif.yml index bed5d8b2d..278bd581d 100644 --- a/.github/workflows/__upload-quality-sarif.yml +++ b/.github/workflows/__upload-quality-sarif.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: upload-quality-sarif: strategy: diff --git a/.github/workflows/__upload-ref-sha-input.yml b/.github/workflows/__upload-ref-sha-input.yml index ac5210936..73fb97c30 100644 --- a/.github/workflows/__upload-ref-sha-input.yml +++ b/.github/workflows/__upload-ref-sha-input.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: upload-ref-sha-input: strategy: diff --git a/.github/workflows/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml index a4bfe4609..93fc4b680 100644 --- a/.github/workflows/__with-checkout-path.yml +++ b/.github/workflows/__with-checkout-path.yml @@ -20,8 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} - workflow_call: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: with-checkout-path: strategy: diff --git a/pr-checks/checks/go-custom-queries.yml b/pr-checks/checks/go-custom-queries.yml index 4eeabfd71..54466b033 100644 --- a/pr-checks/checks/go-custom-queries.yml +++ b/pr-checks/checks/go-custom-queries.yml @@ -1,6 +1,11 @@ name: "Go: Custom queries" description: "Checks that Go works in conjunction with a config file specifying custom queries" collection: go +inputs: + go-version: + type: string + description: "The version of Go to install" + required: true operatingSystems: - ubuntu versions: diff --git a/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml b/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml index 48a15b5df..c379088e2 100644 --- a/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml +++ b/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml @@ -1,11 +1,16 @@ name: "Go: diagnostic when Go is changed after init step" description: "Checks that we emit a diagnostic if Go is changed after the init step" -collection: go # only Linux is affected operatingSystems: ["ubuntu"] # pinned to a version which does not support statically linked binaries for indirect tracing versions: ["default"] installGo: "true" +collection: go +inputs: + go-version: + type: string + description: "The version of Go to install" + required: true steps: - uses: ./../action/init with: diff --git a/pr-checks/checks/go-indirect-tracing-workaround-no-file-program.yml b/pr-checks/checks/go-indirect-tracing-workaround-no-file-program.yml index bc6c05f6f..22ad79eb3 100644 --- a/pr-checks/checks/go-indirect-tracing-workaround-no-file-program.yml +++ b/pr-checks/checks/go-indirect-tracing-workaround-no-file-program.yml @@ -1,11 +1,16 @@ name: "Go: diagnostic when `file` is not installed" description: "Checks that we emit a diagnostic if the `file` program is not installed" -collection: go # only Linux is affected operatingSystems: ["ubuntu"] # pinned to a version which does not support statically linked binaries for indirect tracing versions: ["default"] installGo: "true" +collection: go +inputs: + go-version: + type: string + description: "The version of Go to install" + required: true steps: - name: Remove `file` program run: | diff --git a/pr-checks/checks/go-indirect-tracing-workaround.yml b/pr-checks/checks/go-indirect-tracing-workaround.yml index ddf2ab982..b5ee15b71 100644 --- a/pr-checks/checks/go-indirect-tracing-workaround.yml +++ b/pr-checks/checks/go-indirect-tracing-workaround.yml @@ -1,11 +1,16 @@ name: "Go: workaround for indirect tracing" description: "Checks that our workaround for indirect tracing for Go 1.21+ on Linux works" -collection: go # only Linux is affected operatingSystems: ["ubuntu"] # pinned to a version which does not support statically linked binaries for indirect tracing versions: ["default"] installGo: "true" +collection: go +inputs: + go-version: + type: string + description: "The version of Go to install" + required: true steps: - uses: ./../action/init with: diff --git a/pr-checks/checks/go-tracing-autobuilder.yml b/pr-checks/checks/go-tracing-autobuilder.yml index 9eee38d9e..cdb042bfe 100644 --- a/pr-checks/checks/go-tracing-autobuilder.yml +++ b/pr-checks/checks/go-tracing-autobuilder.yml @@ -1,6 +1,11 @@ name: "Go: tracing with autobuilder step" description: "Checks that Go tracing works when using an autobuilder step" collection: go +inputs: + go-version: + type: string + description: "The version of Go to install" + required: true operatingSystems: ["ubuntu", "macos"] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" diff --git a/pr-checks/checks/go-tracing-custom-build-steps.yml b/pr-checks/checks/go-tracing-custom-build-steps.yml index 3c606ae23..4259fd41a 100644 --- a/pr-checks/checks/go-tracing-custom-build-steps.yml +++ b/pr-checks/checks/go-tracing-custom-build-steps.yml @@ -1,6 +1,11 @@ name: "Go: tracing with custom build steps" description: "Checks that Go tracing traces the build when using custom build steps" collection: go +inputs: + go-version: + type: string + description: "The version of Go to install" + required: true operatingSystems: ["ubuntu", "macos"] installGo: "true" steps: diff --git a/pr-checks/checks/go-tracing-legacy-workflow.yml b/pr-checks/checks/go-tracing-legacy-workflow.yml index 44b5b274f..ea52cb0b1 100644 --- a/pr-checks/checks/go-tracing-legacy-workflow.yml +++ b/pr-checks/checks/go-tracing-legacy-workflow.yml @@ -1,6 +1,11 @@ name: "Go: tracing with legacy workflow" description: "Checks that we run the autobuilder in legacy workflows with neither an autobuild step nor manual build steps" collection: go +inputs: + go-version: + type: string + description: "The version of Go to install" + required: true operatingSystems: ["ubuntu", "macos"] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" diff --git a/pr-checks/sync.py b/pr-checks/sync.py index 59c8628ff..aafb028a1 100755 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -114,11 +114,16 @@ for file in (this_dir / 'checks').glob('*.yml'): installGo = True if checkSpecification['installGo'].lower() == "true" else False if installGo: + goVersionExpr = '>=1.21.0' + + if 'inputs' in checkSpecification and 'go-version' in checkSpecification['inputs']: + goVersionExpr = '${{ inputs.go-version || \'>=1.21.0\' }}' + steps.append({ 'name': 'Install Go', 'uses': 'actions/setup-go@v5', 'with': { - 'go-version': '>=1.21.0', + 'go-version': goVersionExpr, # to avoid potentially misleading autobuilder results where we expect it to download # dependencies successfully, but they actually come from a warm cache 'cache': False @@ -169,6 +174,10 @@ for file in (this_dir / 'checks').glob('*.yml'): 'checkName': checkName }) + workflowInputs = {} + if 'inputs' in checkSpecification: + workflowInputs = checkSpecification['inputs'] + raw_file = this_dir.parent / ".github" / "workflows" / f"__{checkName}.yml.raw" with open(raw_file, 'w') as output_stream: writeHeader(output_stream) @@ -186,8 +195,12 @@ for file in (this_dir / 'checks').glob('*.yml'): 'types': ["opened", "synchronize", "reopened", "ready_for_review"] }, 'schedule': [{'cron': SingleQuotedScalarString('0 5 * * *')}], - 'workflow_dispatch': {}, - 'workflow_call': {} + 'workflow_dispatch': { + 'inputs': workflowInputs + }, + 'workflow_call': { + 'inputs': workflowInputs + } }, 'jobs': { checkName: checkJob @@ -203,10 +216,20 @@ for file in (this_dir / 'checks').glob('*.yml'): # write workflow files for collections for collection_name in collections: jobs = {} + combinedInputs = {} for check in collections[collection_name]: checkName = check['checkName'] checkSpecification = check['specification'] + checkInputs = {} + checkWith = {} + + if 'inputs' in checkSpecification: + combinedInputs |= checkSpecification['inputs'] + + for inputName in checkSpecification['inputs'].keys(): + checkWith[inputName] = "${{ inputs." + inputName + " }}" + jobs[checkName] = { 'name': checkSpecification['name'], 'permissions': { @@ -214,6 +237,7 @@ for collection_name in collections: 'security-events': 'read' }, 'uses': "./.github/workflows/" + f"__{checkName}.yml", + 'with': checkWith } raw_file = this_dir.parent / ".github" / "workflows" / f"__{collection_name}.yml.raw" @@ -231,7 +255,9 @@ for collection_name in collections: f'.github/workflows/__{collection_name}.yml' ] }, - 'workflow_dispatch': {}, + 'workflow_dispatch': { + 'inputs': combinedInputs + }, }, 'jobs': jobs }, output_stream)