diff --git a/.github/workflows/__all-platform-bundle.yml b/.github/workflows/__all-platform-bundle.yml index d9e85736af..45407c57b7 100644 --- a/.github/workflows/__all-platform-bundle.yml +++ b/.github/workflows/__all-platform-bundle.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: all-platform-bundle: strategy: @@ -48,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 - id: init uses: ./../action/init diff --git a/.github/workflows/__analyze-ref-input.yml b/.github/workflows/__analyze-ref-input.yml index 62946c5efb..5e03f49928 100644 --- a/.github/workflows/__analyze-ref-input.yml +++ b/.github/workflows/__analyze-ref-input.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: analyze-ref-input: strategy: @@ -52,7 +65,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/__autobuild-action.yml b/.github/workflows/__autobuild-action.yml index 6296a09601..aebf70fb23 100644 --- a/.github/workflows/__autobuild-action.yml +++ b/.github/workflows/__autobuild-action.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 5128d08b52..325d8c2d97 100644 --- a/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml +++ b/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 19d617944f..882174eab5 100644 --- a/.github/workflows/__autobuild-direct-tracing.yml +++ b/.github/workflows/__autobuild-direct-tracing.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 c5a383732d..f421721b63 100644 --- a/.github/workflows/__build-mode-autobuild.yml +++ b/.github/workflows/__build-mode-autobuild.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 a46e9d9bf0..efec3292bb 100644 --- a/.github/workflows/__build-mode-manual.yml +++ b/.github/workflows/__build-mode-manual.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: build-mode-manual: strategy: @@ -48,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 id: init diff --git a/.github/workflows/__build-mode-none.yml b/.github/workflows/__build-mode-none.yml index da88e57f37..5f649b972c 100644 --- a/.github/workflows/__build-mode-none.yml +++ b/.github/workflows/__build-mode-none.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 70c04f9653..581f785383 100644 --- a/.github/workflows/__build-mode-rollback.yml +++ b/.github/workflows/__build-mode-rollback.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 cbcae42973..7d9becc006 100644 --- a/.github/workflows/__bundle-toolcache.yml +++ b/.github/workflows/__bundle-toolcache.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 dd2a8762f3..650a8617de 100644 --- a/.github/workflows/__bundle-zstd.yml +++ b/.github/workflows/__bundle-zstd.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 770c85a5c2..037f0dfd65 100644 --- a/.github/workflows/__cleanup-db-cluster-dir.yml +++ b/.github/workflows/__cleanup-db-cluster-dir.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 fb96931b62..b3af26b4f2 100644 --- a/.github/workflows/__config-export.yml +++ b/.github/workflows/__config-export.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 4b4c4691e8..aa150be8a7 100644 --- a/.github/workflows/__config-input.yml +++ b/.github/workflows/__config-input.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 6941b28072..3e8c79a8b5 100644 --- a/.github/workflows/__cpp-deptrace-disabled.yml +++ b/.github/workflows/__cpp-deptrace-disabled.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 a9f1f3b369..5995ab945e 100644 --- a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml +++ b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 9736a363b9..623244a57e 100644 --- a/.github/workflows/__cpp-deptrace-enabled.yml +++ b/.github/workflows/__cpp-deptrace-enabled.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 1757f2160a..e07aa5e962 100644 --- a/.github/workflows/__diagnostics-export.yml +++ b/.github/workflows/__diagnostics-export.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 e28a706395..411a0c701b 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: export-file-baseline-information: strategy: @@ -52,7 +65,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 id: init diff --git a/.github/workflows/__extractor-ram-threads.yml b/.github/workflows/__extractor-ram-threads.yml index ca05508ea6..212187b2e2 100644 --- a/.github/workflows/__extractor-ram-threads.yml +++ b/.github/workflows/__extractor-ram-threads.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 c85ceed422..a8b0658a63 100644 --- a/.github/workflows/__go-custom-queries.yml +++ b/.github/workflows/__go-custom-queries.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: go-custom-queries: strategy: @@ -50,7 +63,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 17dea1e901..554bf86e15 100644 --- a/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml +++ b/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: go-indirect-tracing-workaround-diagnostic: strategy: @@ -48,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-no-file-program.yml b/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml index f2fd13e1e8..6af7dce43f 100644 --- a/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml +++ b/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: go-indirect-tracing-workaround-no-file-program: strategy: @@ -48,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 - name: Remove `file` program run: | diff --git a/.github/workflows/__go-indirect-tracing-workaround.yml b/.github/workflows/__go-indirect-tracing-workaround.yml index de29fa75fa..5e6b4e8a2a 100644 --- a/.github/workflows/__go-indirect-tracing-workaround.yml +++ b/.github/workflows/__go-indirect-tracing-workaround.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: go-indirect-tracing-workaround: strategy: @@ -48,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-tracing-autobuilder.yml b/.github/workflows/__go-tracing-autobuilder.yml index 2807d40de6..f761175d99 100644 --- a/.github/workflows/__go-tracing-autobuilder.yml +++ b/.github/workflows/__go-tracing-autobuilder.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: go-tracing-autobuilder: strategy: @@ -78,7 +91,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 ea04b250c3..e061360802 100644 --- a/.github/workflows/__go-tracing-custom-build-steps.yml +++ b/.github/workflows/__go-tracing-custom-build-steps.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: go-tracing-custom-build-steps: strategy: @@ -78,7 +91,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 614d4fe059..f81fd1698d 100644 --- a/.github/workflows/__go-tracing-legacy-workflow.yml +++ b/.github/workflows/__go-tracing-legacy-workflow.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: go-tracing-legacy-workflow: strategy: @@ -78,7 +91,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 new file mode 100644 index 0000000000..e8bf8837e4 --- /dev/null +++ b/.github/workflows/__go.yml @@ -0,0 +1,77 @@ +# Warning: This file is generated automatically, and should not be modified. +# Instead, please modify the template in the pr-checks directory and run: +# pr-checks/sync.sh +# to regenerate this file. + +name: Manual Check - go +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GO111MODULE: auto +on: + push: + paths: + - .github/workflows/__go.yml + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' +jobs: + go-custom-queries: + name: 'Go: Custom queries' + permissions: + contents: read + security-events: read + uses: ./.github/workflows/__go-custom-queries.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 }} + 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-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-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-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 }} diff --git a/.github/workflows/__init-with-registries.yml b/.github/workflows/__init-with-registries.yml index 4a05c70237..c0396cefa2 100644 --- a/.github/workflows/__init-with-registries.yml +++ b/.github/workflows/__init-with-registries.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 a9a79cab18..c8bdfee621 100644 --- a/.github/workflows/__javascript-source-root.yml +++ b/.github/workflows/__javascript-source-root.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 0933ab4bf7..599f21d237 100644 --- a/.github/workflows/__job-run-uuid-sarif.yml +++ b/.github/workflows/__job-run-uuid-sarif.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 9468d14157..629967aee2 100644 --- a/.github/workflows/__language-aliases.yml +++ b/.github/workflows/__language-aliases.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 638816b634..5a56f8bdb5 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: multi-language-autodetect: strategy: @@ -78,7 +91,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 id: init diff --git a/.github/workflows/__overlay-init-fallback.yml b/.github/workflows/__overlay-init-fallback.yml index 2bca888c84..ea40f4df12 100644 --- a/.github/workflows/__overlay-init-fallback.yml +++ b/.github/workflows/__overlay-init-fallback.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 b94a681cff..77fc030499 100644 --- a/.github/workflows/__packaging-codescanning-config-inputs-js.yml +++ b/.github/workflows/__packaging-codescanning-config-inputs-js.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: packaging-codescanning-config-inputs-js: strategy: @@ -64,7 +77,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/__packaging-config-inputs-js.yml b/.github/workflows/__packaging-config-inputs-js.yml index 8b963ec58d..37000d14f2 100644 --- a/.github/workflows/__packaging-config-inputs-js.yml +++ b/.github/workflows/__packaging-config-inputs-js.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: packaging-config-inputs-js: strategy: @@ -64,7 +77,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/__packaging-config-js.yml b/.github/workflows/__packaging-config-js.yml index ece248f5a9..c96bfd784d 100644 --- a/.github/workflows/__packaging-config-js.yml +++ b/.github/workflows/__packaging-config-js.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: packaging-config-js: strategy: @@ -64,7 +77,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/__packaging-inputs-js.yml b/.github/workflows/__packaging-inputs-js.yml index 04cd01ff82..9ba7503de3 100644 --- a/.github/workflows/__packaging-inputs-js.yml +++ b/.github/workflows/__packaging-inputs-js.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: packaging-inputs-js: strategy: @@ -64,7 +77,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/__quality-queries.yml b/.github/workflows/__quality-queries.yml index 1630eaf6e0..1260241cb2 100644 --- a/.github/workflows/__quality-queries.yml +++ b/.github/workflows/__quality-queries.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 07b2133bb0..4a3fd0efff 100644 --- a/.github/workflows/__remote-config.yml +++ b/.github/workflows/__remote-config.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: remote-config: strategy: @@ -50,7 +63,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/__resolve-environment-action.yml b/.github/workflows/__resolve-environment-action.yml index d1d7aa5371..ef130ffa1e 100644 --- a/.github/workflows/__resolve-environment-action.yml +++ b/.github/workflows/__resolve-environment-action.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 da1737bf1b..ce12958b83 100644 --- a/.github/workflows/__rubocop-multi-language.yml +++ b/.github/workflows/__rubocop-multi-language.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: rubocop-multi-language: strategy: diff --git a/.github/workflows/__ruby.yml b/.github/workflows/__ruby.yml index 33c760e6e3..f389cd7b38 100644 --- a/.github/workflows/__ruby.yml +++ b/.github/workflows/__ruby.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: ruby: strategy: diff --git a/.github/workflows/__rust.yml b/.github/workflows/__rust.yml index bff5de3e3a..f7470fd277 100644 --- a/.github/workflows/__rust.yml +++ b/.github/workflows/__rust.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} jobs: rust: strategy: diff --git a/.github/workflows/__split-workflow.yml b/.github/workflows/__split-workflow.yml index dd95646ba9..869db07457 100644 --- a/.github/workflows/__split-workflow.yml +++ b/.github/workflows/__split-workflow.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: split-workflow: strategy: @@ -58,7 +71,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/__start-proxy.yml b/.github/workflows/__start-proxy.yml index 344147b667..b6c23dfb71 100644 --- a/.github/workflows/__start-proxy.yml +++ b/.github/workflows/__start-proxy.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 7fd4678566..c89b63d2c4 100644 --- a/.github/workflows/__submit-sarif-failure.yml +++ b/.github/workflows/__submit-sarif-failure.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 020ff036d8..7dd3afec2e 100644 --- a/.github/workflows/__swift-autobuild.yml +++ b/.github/workflows/__swift-autobuild.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 294bae5d31..0d3e927409 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: swift-custom-build: strategy: @@ -52,7 +65,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 id: init diff --git a/.github/workflows/__test-autobuild-working-dir.yml b/.github/workflows/__test-autobuild-working-dir.yml index 8d3725a6be..dc4d01917a 100644 --- a/.github/workflows/__test-autobuild-working-dir.yml +++ b/.github/workflows/__test-autobuild-working-dir.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 5d1513ca79..417515dfd2 100644 --- a/.github/workflows/__test-local-codeql.yml +++ b/.github/workflows/__test-local-codeql.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: test-local-codeql: strategy: @@ -48,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 - name: Fetch a CodeQL bundle shell: bash diff --git a/.github/workflows/__test-proxy.yml b/.github/workflows/__test-proxy.yml index 9073116fc8..d2f9b3533c 100644 --- a/.github/workflows/__test-proxy.yml +++ b/.github/workflows/__test-proxy.yml @@ -20,7 +20,10 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + 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 8674b65b90..772ac35b05 100644 --- a/.github/workflows/__unset-environment.yml +++ b/.github/workflows/__unset-environment.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: unset-environment: strategy: @@ -50,7 +63,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 id: init diff --git a/.github/workflows/__upload-quality-sarif.yml b/.github/workflows/__upload-quality-sarif.yml index 595170fcae..d122d40861 100644 --- a/.github/workflows/__upload-quality-sarif.yml +++ b/.github/workflows/__upload-quality-sarif.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: upload-quality-sarif: strategy: @@ -52,7 +65,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/__upload-ref-sha-input.yml b/.github/workflows/__upload-ref-sha-input.yml index 5ff0453123..b991e7d36f 100644 --- a/.github/workflows/__upload-ref-sha-input.yml +++ b/.github/workflows/__upload-ref-sha-input.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: upload-ref-sha-input: strategy: @@ -52,7 +65,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/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml index 77c8f8944e..223d376420 100644 --- a/.github/workflows/__with-checkout-path.yml +++ b/.github/workflows/__with-checkout-path.yml @@ -20,7 +20,20 @@ on: - ready_for_review schedule: - cron: '0 5 * * *' - workflow_dispatch: {} + workflow_dispatch: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' + workflow_call: + inputs: + go-version: + type: string + description: The version of Go to install + required: false + default: '>=1.21.0' jobs: with-checkout-path: strategy: @@ -52,7 +65,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: Delete original checkout shell: bash diff --git a/pr-checks/checks/go-custom-queries.yml b/pr-checks/checks/go-custom-queries.yml index 2b3258bc73..4eeabfd717 100644 --- a/pr-checks/checks/go-custom-queries.yml +++ b/pr-checks/checks/go-custom-queries.yml @@ -1,5 +1,6 @@ name: "Go: Custom queries" description: "Checks that Go works in conjunction with a config file specifying custom queries" +collection: go 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 7e0acbe6d1..599706cc3e 100644 --- a/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml +++ b/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml @@ -5,6 +5,7 @@ operatingSystems: ["ubuntu"] # pinned to a version which does not support statically linked binaries for indirect tracing versions: ["default"] installGo: "true" +collection: go 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 830dea00f7..ad700ef072 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 @@ -5,6 +5,7 @@ operatingSystems: ["ubuntu"] # pinned to a version which does not support statically linked binaries for indirect tracing versions: ["default"] installGo: "true" +collection: go 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 859b0516bd..3a564d48ef 100644 --- a/pr-checks/checks/go-indirect-tracing-workaround.yml +++ b/pr-checks/checks/go-indirect-tracing-workaround.yml @@ -5,6 +5,7 @@ operatingSystems: ["ubuntu"] # pinned to a version which does not support statically linked binaries for indirect tracing versions: ["default"] installGo: "true" +collection: go steps: - uses: ./../action/init with: diff --git a/pr-checks/checks/go-tracing-autobuilder.yml b/pr-checks/checks/go-tracing-autobuilder.yml index 85d8c486bf..9eee38d9ed 100644 --- a/pr-checks/checks/go-tracing-autobuilder.yml +++ b/pr-checks/checks/go-tracing-autobuilder.yml @@ -1,5 +1,6 @@ name: "Go: tracing with autobuilder step" description: "Checks that Go tracing works when using an autobuilder step" +collection: go 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 4b7b11582f..3c606ae23f 100644 --- a/pr-checks/checks/go-tracing-custom-build-steps.yml +++ b/pr-checks/checks/go-tracing-custom-build-steps.yml @@ -1,5 +1,6 @@ name: "Go: tracing with custom build steps" description: "Checks that Go tracing traces the build when using custom build steps" +collection: go 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 5cec8818ce..44b5b274f7 100644 --- a/pr-checks/checks/go-tracing-legacy-workflow.yml +++ b/pr-checks/checks/go-tracing-legacy-workflow.yml @@ -1,5 +1,6 @@ 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 operatingSystems: ["ubuntu", "macos"] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" diff --git a/pr-checks/sync.py b/pr-checks/sync.py index f5b651f0a2..b937e43bb1 100755 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -60,10 +60,16 @@ def writeHeader(checkStream): this_dir = pathlib.Path(__file__).resolve().parent allJobs = {} -for file in (this_dir / 'checks').glob('*.yml'): +collections = {} +for file in sorted((this_dir / 'checks').glob('*.yml')): with open(file, 'r') as checkStream: checkSpecification = yaml.load(checkStream) matrix = [] + + workflowInputs = {} + if 'inputs' in checkSpecification: + workflowInputs = checkSpecification['inputs'] + excludedOsesAndVersions = checkSpecification.get('excludeOsAndVersionCombination', []) for version in checkSpecification.get('versions', defaultTestVersions): if version == "latest": @@ -113,11 +119,19 @@ def writeHeader(checkStream): installGo = True if checkSpecification['installGo'].lower() == "true" else False if installGo: + baseGoVersionExpr = '>=1.21.0' + workflowInputs['go-version'] = { + 'type': 'string', + 'description': 'The version of Go to install', + 'required': False, + 'default': baseGoVersionExpr, + } + steps.append({ 'name': 'Install Go', 'uses': 'actions/setup-go@v5', 'with': { - 'go-version': '>=1.21.0', + 'go-version': '${{ inputs.go-version || \'' + baseGoVersionExpr + '\' }}', # to avoid potentially misleading autobuilder results where we expect it to download # dependencies successfully, but they actually come from a warm cache 'cache': False @@ -160,6 +174,15 @@ def writeHeader(checkStream): checkJob['env']['CODEQL_ACTION_TEST_MODE'] = True checkName = file.stem + # If this check belongs to a named collection, record it. + if 'collection' in checkSpecification: + collection_name = checkSpecification['collection'] + collections.setdefault(collection_name, []).append({ + 'specification': checkSpecification, + 'checkName': checkName, + 'inputs': workflowInputs + }) + raw_file = this_dir.parent / ".github" / "workflows" / f"__{checkName}.yml.raw" with open(raw_file, 'w') as output_stream: writeHeader(output_stream) @@ -177,7 +200,12 @@ def writeHeader(checkStream): 'types': ["opened", "synchronize", "reopened", "ready_for_review"] }, 'schedule': [{'cron': SingleQuotedScalarString('0 5 * * *')}], - 'workflow_dispatch': {} + 'workflow_dispatch': { + 'inputs': workflowInputs + }, + 'workflow_call': { + 'inputs': workflowInputs + } }, 'jobs': { checkName: checkJob @@ -189,3 +217,57 @@ def writeHeader(checkStream): content = input_stream.read() output_stream.write("\n".join(list(map(lambda x:x.rstrip(), content.splitlines()))+[''])) os.remove(raw_file) + +# 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 = check['inputs'] + checkWith = {} + + combinedInputs |= checkInputs + + for inputName in checkInputs.keys(): + checkWith[inputName] = "${{ inputs." + inputName + " }}" + + jobs[checkName] = { + 'name': checkSpecification['name'], + 'permissions': { + 'contents': 'read', + 'security-events': 'read' + }, + 'uses': "./.github/workflows/" + f"__{checkName}.yml", + 'with': checkWith + } + + raw_file = this_dir.parent / ".github" / "workflows" / f"__{collection_name}.yml.raw" + with open(raw_file, 'w') as output_stream: + writeHeader(output_stream) + yaml.dump({ + 'name': f"Manual Check - {collection_name}", + 'env': { + 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}', + 'GO111MODULE': 'auto' + }, + 'on': { + 'push': { + 'paths': [ + f'.github/workflows/__{collection_name}.yml' + ] + }, + 'workflow_dispatch': { + 'inputs': combinedInputs + }, + }, + 'jobs': jobs + }, output_stream) + + with open(raw_file, 'r') as input_stream: + with open(this_dir.parent / ".github" / "workflows" / f"__{collection_name}.yml", 'w') as output_stream: + content = input_stream.read() + output_stream.write("\n".join(list(map(lambda x:x.rstrip(), content.splitlines()))+[''])) + os.remove(raw_file)