From 722f2b1a6608b124fe92bc81792e166791399704 Mon Sep 17 00:00:00 2001 From: Pulumi Bot Date: Wed, 12 Nov 2025 06:13:42 +0000 Subject: [PATCH] [internal] Update GitHub Actions workflow files --- .ci-mgmt.yaml | 20 +- .config/mise.lock | 87 ++++++ .config/mise.test.toml | 11 + .config/mise.toml | 29 ++ .github/actions/download-provider/action.yml | 19 ++ .github/actions/download-sdk/action.yml | 20 ++ .github/actions/setup-tools/action.yml | 38 +++ .github/workflows/build.yml | 249 ++++------------ .github/workflows/comment-on-stale-issues.yml | 2 +- .github/workflows/prerelease.yml | 268 ++++-------------- .github/workflows/release.yml | 268 ++++-------------- .github/workflows/release_command.yml | 4 +- .github/workflows/run-acceptance-tests.yml | 137 +++------ .github/workflows/weekly-pulumi-update.yml | 40 +-- mise.toml | 19 -- scripts/get-versions.sh | 55 ++++ 16 files changed, 453 insertions(+), 813 deletions(-) create mode 100644 .config/mise.lock create mode 100644 .config/mise.test.toml create mode 100644 .config/mise.toml create mode 100644 .github/actions/download-provider/action.yml create mode 100644 .github/actions/download-sdk/action.yml create mode 100644 .github/actions/setup-tools/action.yml delete mode 100644 mise.toml create mode 100755 scripts/get-versions.sh diff --git a/.ci-mgmt.yaml b/.ci-mgmt.yaml index 8a0b8a60ae..a3c54e1e06 100644 --- a/.ci-mgmt.yaml +++ b/.ci-mgmt.yaml @@ -6,16 +6,14 @@ gcp: true # need GCP credentials to test in GKE pulumiVersionFile: .pulumi.version major-version: 4 parallel: 3 -toolVersions: - go: 1.24.x esc: - enabled: true + enabled: true envOverride: - PULUMI_API: https://api.pulumi-staging.io - AWS_REGION: us-west-2 - PULUMI_TEST_OWNER: moolumi - GOLANGCI_LINT_VERSION: v1.64.8 - GOOGLE_CI_SERVICE_ACCOUNT_EMAIL: pulumi-ci@pulumi-k8s-provider.iam.gserviceaccount.com - GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci - GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci - GOOGLE_PROJECT_NUMBER: 637339343727 + PULUMI_API: https://api.pulumi-staging.io + AWS_REGION: us-west-2 + PULUMI_TEST_OWNER: moolumi + GOLANGCI_LINT_VERSION: v1.64.8 + GOOGLE_CI_SERVICE_ACCOUNT_EMAIL: pulumi-ci@pulumi-k8s-provider.iam.gserviceaccount.com + GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci + GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci + GOOGLE_PROJECT_NUMBER: 637339343727 diff --git a/.config/mise.lock b/.config/mise.lock new file mode 100644 index 0000000000..d3b7b9374c --- /dev/null +++ b/.config/mise.lock @@ -0,0 +1,87 @@ +[[tools.dotnet]] +version = "8.0.414" +backend = "asdf:dotnet" + +[[tools."github:pulumi/pulumictl"]] +version = "0.0.50" +backend = "github:pulumi/pulumictl" + +[tools."github:pulumi/pulumictl".platforms.linux-x64] +checksum = "sha256:a988418240d3a985bdcb9753b7c65ba4b06608deb359dc2942cb8c9374abc164" +name = "pulumictl-v0.0.50-linux-amd64.tar.gz" +size = 27744219 +url = "https://github.com/pulumi/pulumictl/releases/download/v0.0.50/pulumictl-v0.0.50-linux-amd64.tar.gz" +url_api = "https://api.github.com/repos/pulumi/pulumictl/releases/assets/278054496" + +[[tools."github:pulumi/schema-tools"]] +version = "0.6.0" +backend = "github:pulumi/schema-tools" + +[tools."github:pulumi/schema-tools".platforms.linux-x64] +checksum = "blake3:82dfe616fee18b4258f6e3d2dc3c4e9f14afd43a0a4cc33eff2d2a04088d6ca3" +name = "schema-tools-v0.6.0-linux-amd64.tar.gz" +size = 14282746 +url = "https://github.com/pulumi/schema-tools/releases/download/v0.6.0/schema-tools-v0.6.0-linux-amd64.tar.gz" +url_api = "https://api.github.com/repos/pulumi/schema-tools/releases/assets/118725905" + +[[tools.go]] +version = "1.24.9" +backend = "core:go" + +[tools.go.platforms.linux-x64] +checksum = "sha256:5b7899591c2dd6e9da1809fde4a2fad842c45d3f6b9deb235ba82216e31e34a6" +size = 78693175 +url = "https://dl.google.com/go/go1.24.9.linux-amd64.tar.gz" + +[[tools.golangci-lint]] +version = "1.64.8" +backend = "aqua:golangci/golangci-lint" + +[tools.golangci-lint.platforms.linux-x64] +checksum = "sha256:b6270687afb143d019f387c791cd2a6f1cb383be9b3124d241ca11bd3ce2e54e" +size = 12364828 +url = "https://github.com/golangci/golangci-lint/releases/download/v1.64.8/golangci-lint-1.64.8-linux-amd64.tar.gz" + +[[tools.gradle]] +version = "7.6.6" +backend = "aqua:gradle/gradle" + +[tools.gradle.platforms.linux-x64] +checksum = "sha256:673d9776f303bc7048fc3329d232d6ebf1051b07893bd9d11616fad9a8673be0" +size = 128439774 +url = "https://github.com/gradle/gradle-distributions/releases/download/v7.6.6/gradle-7.6.6-bin.zip" + +[[tools.java]] +version = "corretto-11.0.29.7.1" +backend = "core:java" + +[tools.java.platforms.linux-x64] +checksum = "sha256:279c6d3124f8b0251b16297b16687fe8b3946410b05ed27de1259b5e5cea02ba" +size = 195379320 +url = "https://corretto.aws/downloads/resources/11.0.29.7.1/amazon-corretto-11.0.29.7.1-linux-x64.tar.gz" + +[[tools.node]] +version = "20.19.5" +backend = "core:node" + +[tools.node.platforms.linux-x64] +checksum = "sha256:4eba5fbe1fb10753bc06e42f001a91c5cec16798b7764a3e9257adc59af47fe1" +size = 47041607 +url = "https://nodejs.org/dist/v20.19.5/node-v20.19.5-linux-x64.tar.gz" + +[[tools."npm:yarn"]] +version = "1.22.22" +backend = "npm:yarn" + +[[tools.pulumi]] +version = "3.205.0" +backend = "aqua:pulumi/pulumi" + +[tools.pulumi.platforms.linux-x64] +checksum = "sha256:210540f40df959f11e8fd5fb38e288c8b86f2a16a0511db9b812adb97160f892" +size = 94479557 +url = "https://github.com/pulumi/pulumi/releases/download/v3.205.0/pulumi-v3.205.0-linux-x64.tar.gz" + +[[tools.python]] +version = "3.11.8" +backend = "core:python" diff --git a/.config/mise.test.toml b/.config/mise.test.toml new file mode 100644 index 0000000000..3ab74020ab --- /dev/null +++ b/.config/mise.test.toml @@ -0,0 +1,11 @@ +# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt + +# Overrides for test workflows + +[env] +# Acceptance (specifically providertest) tests require that PULUMI_HOME be the default +PULUMI_HOME = "{{ env.HOME }}/.pulumi" + +[tools] +# always use pulumi latest for tests +pulumi = "latest" diff --git a/.config/mise.toml b/.config/mise.toml new file mode 100644 index 0000000000..f52e9c42f6 --- /dev/null +++ b/.config/mise.toml @@ -0,0 +1,29 @@ +# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt +# You can create your own root-level mise.toml file to override/augment this. See https://mise.jdx.dev/configuration.html + +[env] +_.source = "{{config_root}}/scripts/get-versions.sh" +PULUMI_HOME = "{{config_root}}/.pulumi" + +[tools] + +# Runtimes +# TODO: we may not need 'get_env' once https://github.com/jdx/mise/discussions/6339 is fixed +go = "{{ get_env(name='GO_VERSION_MISE', default='latest') }}" +node = '20.19.5' +python = '3.11.8' +dotnet = '8.0.414' +# Corretto version used as Java SE/OpenJDK version no longer offered +java = 'corretto-11' + +# Executable tools +pulumi = "{{ get_env(name='PULUMI_VERSION_MISE', default='latest') }}" +"github:pulumi/pulumictl" = 'latest' +"github:pulumi/schema-tools" = "latest" +gradle = '7.6' +golangci-lint = "1.64.8" # See note about about overrides if you need to customize this. +"npm:yarn" = "1.22.22" + +[settings] +experimental = true # Required for Go binaries (e.g. pulumictl). +lockfile = true diff --git a/.github/actions/download-provider/action.yml b/.github/actions/download-provider/action.yml new file mode 100644 index 0000000000..703fd17fd8 --- /dev/null +++ b/.github/actions/download-provider/action.yml @@ -0,0 +1,19 @@ +name: Download Provider Binary +description: Downloads the provider binary artifact and restores executable permissions + +runs: + using: "composite" + steps: + - name: Download provider + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + with: + name: pulumi-${{ env.PROVIDER }}-provider.tar.gz + path: ${{ github.workspace }}/bin + + - name: UnTar provider binaries + shell: bash + run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace}}/bin + + - name: Restore Binary Permissions + shell: bash + run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print -exec chmod +x {} \; diff --git a/.github/actions/download-sdk/action.yml b/.github/actions/download-sdk/action.yml new file mode 100644 index 0000000000..2e8cac237e --- /dev/null +++ b/.github/actions/download-sdk/action.yml @@ -0,0 +1,20 @@ +name: Download SDK +description: Downloads and extracts SDK artifacts for a specific language + +inputs: + language: + description: 'The SDK language to download (nodejs, python, dotnet, java)' + required: true + +runs: + using: "composite" + steps: + - name: Download SDK + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + with: + name: ${{ inputs.language }}-sdk.tar.gz + path: ${{ github.workspace }}/sdk/ + + - name: UnTar SDK folder + shell: bash + run: tar -zxf ${{ github.workspace }}/sdk/${{ inputs.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ inputs.language }} diff --git a/.github/actions/setup-tools/action.yml b/.github/actions/setup-tools/action.yml new file mode 100644 index 0000000000..2953701e0f --- /dev/null +++ b/.github/actions/setup-tools/action.yml @@ -0,0 +1,38 @@ +name: Setup Tools +description: Installs all tools (Go, Node, Python, .NET, Java, Pulumi, etc.) using mise + +inputs: + cache: + description: Enable caching + required: false + default: 'false' + +runs: + using: "composite" + steps: + - name: Setup mise + uses: jdx/mise-action@be3be2260bc02bc3fbf94c5e2fed8b7964baf074 # v3 + with: + # Latest working version. See https://github.com/jdx/mise/discussions/6781 + version: 2025.10.16 + github_token: ${{ github.token }} + cache_key: "mise-{{platform}}-{{file_hash}}" + cache_save: ${{ inputs.cache }} + + - name: Setup Go Cache + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + cache: ${{ inputs.cache }} + cache-dependency-path: | + provider/*.sum + upstream/*.sum + sdk/go/*.sum + sdk/*.sum + *.sum + + - name: Setup Node + uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 + with: + # we don't set node-version because we install with mise. + # this step is needed to setup npm auth + registry-url: https://registry.npmjs.org diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec110d3435..27ee1ae779 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,9 +16,7 @@ on: workflow_dispatch: {} env: PROVIDER: kubernetes - PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget TRAVIS_OS_NAME: linux - PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. GOVERSION: "1.24.x" NODEVERSION: "20.x" PYTHONVERSION: "3.11.8" @@ -61,19 +59,10 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + - name: Setup Tools + uses: ./.github/actions/setup-tools with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version + cache: 'true' - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 @@ -126,6 +115,11 @@ jobs: sdk/go/**/pulumiUtilities.go sdk/nodejs/package.json sdk/python/pyproject.toml + sdk/java/build.gradle + **/mise.lock + **/.config/mise.lock + **/mise.*.lock + **/.config/mise.*.lock - name: Commit SDK changes for Renovate if: failure() && steps.worktreeClean.outcome == 'failure' && contains(github.actor, 'renovate') && github.event_name == @@ -180,7 +174,7 @@ jobs: github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }} pulumi-gen-${{ env.PROVIDER}} - name: Upload artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: pulumi-${{ env.PROVIDER }}-provider.tar.gz path: ${{ github.workspace }}/bin/provider.tar.gz @@ -194,7 +188,7 @@ jobs: CODECOV_TOKEN: ${{ steps.esc-secrets.outputs.CODECOV_TOKEN }} - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in building provider prerequisites fields: repo,commit,author,action @@ -238,53 +232,10 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - java-version: ${{ env.JAVAVERSION }} - distribution: temurin - cache: gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - with: - gradle-version: "7.6" - - name: Download provider - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 - with: - name: pulumi-${{ env.PROVIDER }}-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: UnTar provider binaries - run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - name: Restore Binary Permissions - run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print - -exec chmod +x {} \; + - name: Setup Tools + uses: ./.github/actions/setup-tools + - name: Download Provider Binary + uses: ./.github/actions/download-provider - name: Generate SDK run: make ${{ matrix.language }}_sdk - name: Check worktree clean @@ -298,6 +249,11 @@ jobs: sdk/go/**/pulumiUtilities.go sdk/nodejs/package.json sdk/python/pyproject.toml + sdk/java/build.gradle + **/mise.lock + **/.config/mise.lock + **/mise.*.lock + **/.config/mise.*.lock - name: Commit SDK changes for Renovate if: failure() && steps.worktreeClean.outcome == 'failure' && contains(github.actor, 'renovate') && github.event_name == @@ -350,14 +306,14 @@ jobs: - name: Tar SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ matrix.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz retention-days: 30 - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure while building SDKs fields: repo,commit,author,action @@ -439,63 +395,15 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - java-version: ${{ env.JAVAVERSION }} - distribution: temurin - cache: gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - with: - gradle-version: "7.6" - - name: Download provider - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 - with: - name: pulumi-${{ env.PROVIDER }}-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: UnTar provider binaries - run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - name: Restore Binary Permissions - run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print - -exec chmod +x {} \; + - name: Setup Tools + uses: ./.github/actions/setup-tools + - name: Download Provider Binary + uses: ./.github/actions/download-provider - name: Download SDK if: ${{ matrix.language != 'yaml' }} - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: ./.github/actions/download-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: UnTar SDK folder - if: ${{ matrix.language != 'yaml' }} - run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{ - github.workspace}}/sdk/${{ matrix.language}} + language: ${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Node dependencies @@ -511,7 +419,7 @@ jobs: - name: Make Kube Directory run: mkdir -p "$HOME/.kube/" - name: Download Kubeconfig - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: config path: ~/.kube/ @@ -523,7 +431,7 @@ jobs: requested-token-type: urn:pulumi:token-type:access_token:organization export-environment-variables: false - name: Export AWS Credentials - uses: pulumi/esc-action@6cf9520e68354d86f81c455e8d43eabd58f5c9f5 # v1.5.0 + uses: pulumi/esc-action@efb0bc8946938f0dfbfa00e829196ec95f0d0ea7 # v1.4.0 env: PULUMI_ACCESS_TOKEN: ${{ steps.generate_pulumi_token.outputs.pulumi-access-token }} with: @@ -568,7 +476,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in SDK tests fields: repo,commit,author,action @@ -603,11 +511,8 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Clear GitHub Actions Ubuntu runner disk space uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 with: @@ -617,16 +522,8 @@ jobs: haskell: true swap-storage: true large-packages: false - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0 + uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0 with: aws-access-key-id: ${{ steps.esc-secrets.outputs.AWS_ACCESS_KEY_ID }} aws-region: us-east-2 @@ -650,7 +547,7 @@ jobs: version: latest - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in publishing binaries fields: repo,commit,author,action @@ -691,32 +588,10 @@ jobs: path: ci-scripts repository: pulumi/scripts - run: echo "ci-scripts" >> .git/info/exclude - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Download python SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: python-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -724,7 +599,7 @@ jobs: run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C ${{github.workspace}}/sdk/python - name: Download dotnet SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: dotnet-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -732,7 +607,7 @@ jobs: run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C ${{github.workspace}}/sdk/dotnet - name: Download nodejs SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: nodejs-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -756,7 +631,7 @@ jobs: PUBLISH_REPO_PASSWORD: ${{ steps.esc-secrets.outputs.OSSRH_PASSWORD }} - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in publishing SDK fields: repo,commit,author,action @@ -772,19 +647,15 @@ jobs: lfs: true persist-credentials: false ref: ${{ env.PR_COMMIT_SHA }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Disarm go:embed directives to enable linters that compile source code run: git grep -l 'go:embed' -- provider | xargs --no-run-if-empty sed -i 's/go:embed/ goembed/g' - name: golangci-lint provider pkg uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2 with: - version: ${{ env.GOLANGCI_LINT_VERSION }} - args: -c ../.golangci.yml + install-mode: none # Handled by mise. working-directory: provider name: lint if: github.event_name == 'repository_dispatch' || @@ -802,20 +673,8 @@ jobs: uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Authenticate to Google Cloud uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 with: @@ -856,7 +715,7 @@ jobs: env: PULUMI_ACCESS_TOKEN: ${{ steps.generate_pulumi_token.outputs.pulumi-access-token }} - name: Upload Kubernetes Artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: config path: ~/.kube/config @@ -876,20 +735,8 @@ jobs: uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Authenticate to Google Cloud uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 with: diff --git a/.github/workflows/comment-on-stale-issues.yml b/.github/workflows/comment-on-stale-issues.yml index 79be47c19d..e3ec80ee5c 100644 --- a/.github/workflows/comment-on-stale-issues.yml +++ b/.github/workflows/comment-on-stale-issues.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest name: Stale issue job steps: - - uses: aws-actions/stale-issue-cleanup@5650b49bcd757a078f6ca06c373d7807b773f9bc #v7.1.0 + - uses: aws-actions/stale-issue-cleanup@5650b49bcd757a078f6ca06c373d7807b773f9bc # v7.1.0 with: issue-types: issues # only look at issues (ignore pull-requests) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index c81cc9601c..688176e758 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -7,9 +7,7 @@ on: - v*.*.*-** env: PROVIDER: kubernetes - PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget TRAVIS_OS_NAME: linux - PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. GOVERSION: "1.24.x" NODEVERSION: "20.x" PYTHONVERSION: "3.11.8" @@ -50,19 +48,10 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + - name: Setup Tools + uses: ./.github/actions/setup-tools with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version + cache: 'true' - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 @@ -115,6 +104,11 @@ jobs: sdk/go/**/pulumiUtilities.go sdk/nodejs/package.json sdk/python/pyproject.toml + sdk/java/build.gradle + **/mise.lock + **/.config/mise.lock + **/mise.*.lock + **/.config/mise.*.lock - name: Commit SDK changes for Renovate if: failure() && steps.worktreeClean.outcome == 'failure' && contains(github.actor, 'renovate') && github.event_name == @@ -169,7 +163,7 @@ jobs: github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }} pulumi-gen-${{ env.PROVIDER}} - name: Upload artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: pulumi-${{ env.PROVIDER }}-provider.tar.gz path: ${{ github.workspace }}/bin/provider.tar.gz @@ -183,7 +177,7 @@ jobs: CODECOV_TOKEN: ${{ steps.esc-secrets.outputs.CODECOV_TOKEN }} - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in building provider prerequisites fields: repo,commit,author,action @@ -227,53 +221,10 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - java-version: ${{ env.JAVAVERSION }} - distribution: temurin - cache: gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - with: - gradle-version: "7.6" - - name: Download provider - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 - with: - name: pulumi-${{ env.PROVIDER }}-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: UnTar provider binaries - run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - name: Restore Binary Permissions - run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print - -exec chmod +x {} \; + - name: Setup Tools + uses: ./.github/actions/setup-tools + - name: Download Provider Binary + uses: ./.github/actions/download-provider - name: Generate SDK run: make ${{ matrix.language }}_sdk - name: Check worktree clean @@ -287,6 +238,11 @@ jobs: sdk/go/**/pulumiUtilities.go sdk/nodejs/package.json sdk/python/pyproject.toml + sdk/java/build.gradle + **/mise.lock + **/.config/mise.lock + **/mise.*.lock + **/.config/mise.*.lock - name: Commit ${{ matrix.language }} SDK changes for Renovate if: failure() && steps.worktreeClean.outcome == 'failure' && contains(github.actor, 'renovate') && github.event_name == @@ -339,13 +295,13 @@ jobs: - name: Tar SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ matrix.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure while building SDKs fields: repo,commit,author,action @@ -392,63 +348,15 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - java-version: ${{ env.JAVAVERSION }} - distribution: temurin - cache: gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - with: - gradle-version: "7.6" - - name: Download provider - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 - with: - name: pulumi-${{ env.PROVIDER }}-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: UnTar provider binaries - run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - name: Restore Binary Permissions - run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print - -exec chmod +x {} \; + - name: Setup Tools + uses: ./.github/actions/setup-tools + - name: Download Provider Binary + uses: ./.github/actions/download-provider - name: Download SDK if: ${{ matrix.language != 'yaml' }} - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: ./.github/actions/download-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: UnTar SDK folder - if: ${{ matrix.language != 'yaml' }} - run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{ - github.workspace}}/sdk/${{ matrix.language}} + language: ${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Node dependencies @@ -464,7 +372,7 @@ jobs: - name: Make Kube Directory run: mkdir -p "$HOME/.kube/" - name: Download Kubeconfig - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: config path: ~/.kube/ @@ -476,7 +384,7 @@ jobs: requested-token-type: urn:pulumi:token-type:access_token:organization export-environment-variables: false - name: Export AWS Credentials - uses: pulumi/esc-action@6cf9520e68354d86f81c455e8d43eabd58f5c9f5 # v1.5.0 + uses: pulumi/esc-action@efb0bc8946938f0dfbfa00e829196ec95f0d0ea7 # v1.4.0 env: PULUMI_ACCESS_TOKEN: ${{ steps.generate_pulumi_token.outputs.pulumi-access-token }} with: @@ -521,7 +429,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in SDK tests fields: repo,commit,author,action @@ -556,11 +464,8 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Clear GitHub Actions Ubuntu runner disk space uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 with: @@ -570,16 +475,8 @@ jobs: haskell: true swap-storage: true large-packages: false - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0 + uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0 with: aws-access-key-id: ${{ steps.esc-secrets.outputs.AWS_ACCESS_KEY_ID }} aws-region: us-east-2 @@ -603,7 +500,7 @@ jobs: version: latest - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in publishing binaries fields: repo,commit,author,action @@ -644,32 +541,10 @@ jobs: path: ci-scripts repository: pulumi/scripts - run: echo "ci-scripts" >> .git/info/exclude - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Download python SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: python-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -677,7 +552,7 @@ jobs: run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C ${{github.workspace}}/sdk/python - name: Download dotnet SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: dotnet-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -685,7 +560,7 @@ jobs: run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C ${{github.workspace}}/sdk/dotnet - name: Download nodejs SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: nodejs-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -704,7 +579,7 @@ jobs: PYPI_PASSWORD: ${{ steps.esc-secrets.outputs.PYPI_API_TOKEN }} - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in publishing SDK fields: repo,commit,author,action @@ -740,29 +615,10 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - - name: Setup Java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - java-version: ${{ env.JAVAVERSION }} - distribution: temurin - cache: gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - with: - gradle-version: "7.6" + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Download java SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: java-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -770,7 +626,7 @@ jobs: run: tar -zxf ${{github.workspace}}/sdk/java.tar.gz -C ${{github.workspace}}/sdk/java - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 + uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 with: gradle-version: "7.6" - name: Publish Java SDK @@ -799,7 +655,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Download go SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: go-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -832,20 +688,8 @@ jobs: uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Authenticate to Google Cloud uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 with: @@ -886,7 +730,7 @@ jobs: env: PULUMI_ACCESS_TOKEN: ${{ steps.generate_pulumi_token.outputs.pulumi-access-token }} - name: Upload Kubernetes Artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: config path: ~/.kube/config @@ -906,20 +750,8 @@ jobs: uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Authenticate to Google Cloud uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ccc520fa9..314b762c3f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,9 +8,7 @@ on: - "!v*.*.*-**" env: PROVIDER: kubernetes - PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget TRAVIS_OS_NAME: linux - PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. GOVERSION: "1.24.x" NODEVERSION: "20.x" PYTHONVERSION: "3.11.8" @@ -53,19 +51,10 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + - name: Setup Tools + uses: ./.github/actions/setup-tools with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version + cache: 'true' - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 @@ -118,6 +107,11 @@ jobs: sdk/go/**/pulumiUtilities.go sdk/nodejs/package.json sdk/python/pyproject.toml + sdk/java/build.gradle + **/mise.lock + **/.config/mise.lock + **/mise.*.lock + **/.config/mise.*.lock - name: Commit SDK changes for Renovate if: failure() && steps.worktreeClean.outcome == 'failure' && contains(github.actor, 'renovate') && github.event_name == @@ -172,7 +166,7 @@ jobs: github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }} pulumi-gen-${{ env.PROVIDER}} - name: Upload artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: pulumi-${{ env.PROVIDER }}-provider.tar.gz path: ${{ github.workspace }}/bin/provider.tar.gz @@ -186,7 +180,7 @@ jobs: CODECOV_TOKEN: ${{ steps.esc-secrets.outputs.CODECOV_TOKEN }} - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in building provider prerequisites fields: repo,commit,author,action @@ -230,53 +224,10 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - java-version: ${{ env.JAVAVERSION }} - distribution: temurin - cache: gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - with: - gradle-version: "7.6" - - name: Download provider - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 - with: - name: pulumi-${{ env.PROVIDER }}-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: UnTar provider binaries - run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - name: Restore Binary Permissions - run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print - -exec chmod +x {} \; + - name: Setup Tools + uses: ./.github/actions/setup-tools + - name: Download Provider Binary + uses: ./.github/actions/download-provider - name: Generate SDK run: make ${{ matrix.language }}_sdk - name: Check worktree clean @@ -290,6 +241,11 @@ jobs: sdk/go/**/pulumiUtilities.go sdk/nodejs/package.json sdk/python/pyproject.toml + sdk/java/build.gradle + **/mise.lock + **/.config/mise.lock + **/mise.*.lock + **/.config/mise.*.lock - name: Commit SDK changes for Renovate if: failure() && steps.worktreeClean.outcome == 'failure' && contains(github.actor, 'renovate') && github.event_name == @@ -342,13 +298,13 @@ jobs: - name: Tar SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ matrix.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure while building SDKs fields: repo,commit,author,action @@ -395,63 +351,15 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - java-version: ${{ env.JAVAVERSION }} - distribution: temurin - cache: gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - with: - gradle-version: "7.6" - - name: Download provider - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 - with: - name: pulumi-${{ env.PROVIDER }}-provider.tar.gz - path: ${{ github.workspace }}/bin - - name: UnTar provider binaries - run: tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ - github.workspace}}/bin - - name: Restore Binary Permissions - run: find ${{ github.workspace }} -name "pulumi-*-${{ env.PROVIDER }}" -print - -exec chmod +x {} \; + - name: Setup Tools + uses: ./.github/actions/setup-tools + - name: Download Provider Binary + uses: ./.github/actions/download-provider - name: Download SDK if: ${{ matrix.language != 'yaml' }} - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: ./.github/actions/download-sdk with: - name: ${{ matrix.language }}-sdk.tar.gz - path: ${{ github.workspace}}/sdk/ - - name: UnTar SDK folder - if: ${{ matrix.language != 'yaml' }} - run: tar -zxf ${{ github.workspace}}/sdk/${{ matrix.language}}.tar.gz -C ${{ - github.workspace}}/sdk/${{ matrix.language}} + language: ${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Node dependencies @@ -467,7 +375,7 @@ jobs: - name: Make Kube Directory run: mkdir -p "$HOME/.kube/" - name: Download Kubeconfig - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: config path: ~/.kube/ @@ -479,7 +387,7 @@ jobs: requested-token-type: urn:pulumi:token-type:access_token:organization export-environment-variables: false - name: Export AWS Credentials - uses: pulumi/esc-action@6cf9520e68354d86f81c455e8d43eabd58f5c9f5 # v1.5.0 + uses: pulumi/esc-action@efb0bc8946938f0dfbfa00e829196ec95f0d0ea7 # v1.4.0 env: PULUMI_ACCESS_TOKEN: ${{ steps.generate_pulumi_token.outputs.pulumi-access-token }} with: @@ -524,7 +432,7 @@ jobs: GTIHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in SDK tests fields: repo,commit,author,action @@ -559,11 +467,8 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Clear GitHub Actions Ubuntu runner disk space uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 with: @@ -573,16 +478,8 @@ jobs: haskell: true swap-storage: true large-packages: false - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0 + uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0 with: aws-access-key-id: ${{ steps.esc-secrets.outputs.AWS_ACCESS_KEY_ID }} aws-region: us-east-2 @@ -606,7 +503,7 @@ jobs: version: latest - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in publishing binaries fields: repo,commit,author,action @@ -647,32 +544,10 @@ jobs: path: ci-scripts repository: pulumi/scripts - run: echo "ci-scripts" >> .git/info/exclude - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Download python SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: python-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -680,7 +555,7 @@ jobs: run: tar -zxf ${{github.workspace}}/sdk/python.tar.gz -C ${{github.workspace}}/sdk/python - name: Download dotnet SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: dotnet-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -688,7 +563,7 @@ jobs: run: tar -zxf ${{github.workspace}}/sdk/dotnet.tar.gz -C ${{github.workspace}}/sdk/dotnet - name: Download nodejs SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: nodejs-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -707,7 +582,7 @@ jobs: PYPI_PASSWORD: ${{ steps.esc-secrets.outputs.PYPI_API_TOKEN }} - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in publishing SDK fields: repo,commit,author,action @@ -743,29 +618,10 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - - name: Setup Java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - java-version: ${{ env.JAVAVERSION }} - distribution: temurin - cache: gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - with: - gradle-version: "7.6" + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Download java SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: java-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -773,7 +629,7 @@ jobs: run: tar -zxf ${{github.workspace}}/sdk/java.tar.gz -C ${{github.workspace}}/sdk/java - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 + uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 with: gradle-version: "7.6" - name: Publish Java SDK @@ -802,7 +658,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Download go SDK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: go-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -865,20 +721,8 @@ jobs: uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Authenticate to Google Cloud uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 with: @@ -919,7 +763,7 @@ jobs: env: PULUMI_ACCESS_TOKEN: ${{ steps.generate_pulumi_token.outputs.pulumi-access-token }} - name: Upload Kubernetes Artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: config path: ~/.kube/config @@ -939,20 +783,8 @@ jobs: uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Authenticate to Google Cloud uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 with: diff --git a/.github/workflows/release_command.yml b/.github/workflows/release_command.yml index f70c3ac4ff..443b8cb99c 100644 --- a/.github/workflows/release_command.yml +++ b/.github/workflows/release_command.yml @@ -37,7 +37,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: failure() name: Notify failure - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} repository: ${{ github.event.client_payload.github.payload.repository.full_name }} @@ -46,7 +46,7 @@ jobs: "release command failed: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - if: success() name: Notify success - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} repository: ${{ github.event.client_payload.github.payload.repository.full_name }} diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index c65e03b136..e32f913ad9 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -11,9 +11,7 @@ on: workflow_dispatch: {} env: PROVIDER: kubernetes - PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget TRAVIS_OS_NAME: linux - PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. GOVERSION: "1.24.x" NODEVERSION: "20.x" PYTHONVERSION: "3.11.8" @@ -46,7 +44,7 @@ jobs: "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" - name: Update with Result - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} repository: ${{ github.event.client_payload.github.payload.repository.full_name }} @@ -81,19 +79,10 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 + - name: Setup Tools + uses: ./.github/actions/setup-tools with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version + cache: 'true' - if: github.event_name == 'pull_request' name: Install Schema Tools uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 @@ -146,6 +135,11 @@ jobs: sdk/go/**/pulumiUtilities.go sdk/nodejs/package.json sdk/python/pyproject.toml + sdk/java/build.gradle + **/mise.lock + **/.config/mise.lock + **/mise.*.lock + **/.config/mise.*.lock - name: Commit SDK changes for Renovate if: failure() && steps.worktreeClean.outcome == 'failure' && contains(github.actor, 'renovate') && github.event_name == @@ -200,7 +194,7 @@ jobs: github.workspace}}/bin/ pulumi-resource-${{ env.PROVIDER }} pulumi-gen-${{ env.PROVIDER}} - name: Upload artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: pulumi-${{ env.PROVIDER }}-provider.tar.gz path: ${{ github.workspace }}/bin/provider.tar.gz @@ -214,7 +208,7 @@ jobs: CODECOV_TOKEN: ${{ steps.esc-secrets.outputs.CODECOV_TOKEN }} - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in building provider prerequisites fields: repo,commit,author,action @@ -262,44 +256,10 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - java-version: ${{ env.JAVAVERSION }} - distribution: temurin - cache: gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - with: - gradle-version: "7.6" + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Download provider - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: pulumi-${{ env.PROVIDER }}-provider.tar.gz path: ${{ github.workspace }}/bin @@ -322,6 +282,11 @@ jobs: sdk/go/**/pulumiUtilities.go sdk/nodejs/package.json sdk/python/pyproject.toml + sdk/java/build.gradle + **/mise.lock + **/.config/mise.lock + **/mise.*.lock + **/.config/mise.*.lock - name: Commit SDK changes for Renovate if: failure() && steps.worktreeClean.outcome == 'failure' && contains(github.actor, 'renovate') && github.event_name == @@ -373,14 +338,14 @@ jobs: - name: Tar SDK folder run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . - name: Upload artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ${{ matrix.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz retention-days: 30 - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure while building SDKs fields: repo,commit,author,action @@ -430,44 +395,10 @@ jobs: set-env: PROVIDER_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - java-version: ${{ env.JAVAVERSION }} - distribution: temurin - cache: gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - with: - gradle-version: "7.6" + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Download provider - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: pulumi-${{ env.PROVIDER }}-provider.tar.gz path: ${{ github.workspace }}/bin @@ -479,7 +410,7 @@ jobs: -exec chmod +x {} \; - name: Download SDK if: ${{ matrix.language != 'yaml' }} - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: ${{ matrix.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/ @@ -507,7 +438,7 @@ jobs: requested-token-type: urn:pulumi:token-type:access_token:organization export-environment-variables: false - name: Export AWS Credentials - uses: pulumi/esc-action@6cf9520e68354d86f81c455e8d43eabd58f5c9f5 # v1.5.0 + uses: pulumi/esc-action@efb0bc8946938f0dfbfa00e829196ec95f0d0ea7 # v1.4.0 env: PULUMI_ACCESS_TOKEN: ${{ steps.generate_pulumi_token.outputs.pulumi-access-token }} with: @@ -546,7 +477,7 @@ jobs: version: v2.5.0 token: ${{ secrets.GITHUB_TOKEN }} - name: Setup KinD cluster - uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0 + uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0 with: cluster_name: kind-integration-tests-${{ matrix.language }} node_image: kindest/node:v1.29.2 @@ -557,7 +488,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: failure() && github.event_name == 'push' name: Notify Slack - uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e # v3.18.0 + uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 with: author_name: Failure in SDK tests fields: repo,commit,author,action @@ -586,7 +517,7 @@ jobs: name: Fetch secrets from ESC uses: pulumi/esc-action@9eb774255b1a4afb7855678ae8d4a77359da0d9b - name: Mark workflow as successful - uses: guibranco/github-status-action-v2@0849440ec82c5fa69b2377725b9b7852a3977e76 # v1.1.13 + uses: guibranco/github-status-action-v2@631f55ea0251f0fb284525ad86c30e9f7a8dd284 # v1.1.14 with: authToken: ${{ secrets.GITHUB_TOKEN }} context: Sentinel @@ -611,19 +542,15 @@ jobs: lfs: true persist-credentials: false ref: ${{ env.PR_COMMIT_SHA }} - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Disarm go:embed directives to enable linters that compile source code run: git grep -l 'go:embed' -- provider | xargs --no-run-if-empty sed -i 's/go:embed/ goembed/g' - name: golangci-lint provider pkg uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2 with: - version: ${{ env.GOLANGCI_LINT_VERSION }} - args: -c ../.golangci.yml + install-mode: none # Handled by mise. working-directory: provider name: lint if: github.event_name == 'repository_dispatch' || diff --git a/.github/workflows/weekly-pulumi-update.yml b/.github/workflows/weekly-pulumi-update.yml index 878091c712..370c833e4c 100644 --- a/.github/workflows/weekly-pulumi-update.yml +++ b/.github/workflows/weekly-pulumi-update.yml @@ -8,9 +8,7 @@ on: env: GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} PROVIDER: kubernetes - PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget TRAVIS_OS_NAME: linux - PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. GOVERSION: "1.24.x" NODEVERSION: "20.x" PYTHONVERSION: "3.11.8" @@ -43,42 +41,8 @@ jobs: id: esc-secrets name: Fetch secrets from ESC uses: pulumi/esc-action@9eb774255b1a4afb7855678ae8d4a77359da0d9b - - name: Install Go - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version: ${{ env.GOVERSION }} - cache-dependency-path: "**/*.sum" - - name: Install pulumictl - uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 - with: - repo: pulumi/pulumictl - - name: Install Pulumi CLI - uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0 - with: - pulumi-version-file: .pulumi.version - - name: Setup DotNet - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 - with: - dotnet-version: ${{ env.DOTNETVERSION }} - - name: Setup Node - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version: ${{ env.NODEVERSION }} - registry-url: https://registry.npmjs.org - - name: Setup Python - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 - with: - python-version: ${{ env.PYTHONVERSION }} - - name: Setup Java - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 - with: - java-version: ${{ env.JAVAVERSION }} - distribution: temurin - cache: gradle - - name: Setup Gradle - uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 - with: - gradle-version: "7.6" + - name: Setup Tools + uses: ./.github/actions/setup-tools - name: Update Pulumi/Pulumi id: gomod run: >- diff --git a/mise.toml b/mise.toml deleted file mode 100644 index 57433b07fd..0000000000 --- a/mise.toml +++ /dev/null @@ -1,19 +0,0 @@ -# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt - -[tools] - -# Runtimes -go = '1.24' -node = '20' -python = '3.11.8' -dotnet = '8.0' -# Corretto version used as Java SE/OpenJDK version no longer offered -java = 'corretto-11' - -# Executable tools -pulumi = 'latest' -"go:github.com/pulumi/pulumictl/cmd/pulumictl" = 'latest' -gradle = '7.6' - -[settings] -experimental = true # Required for Go binaries (e.g. pulumictl). diff --git a/scripts/get-versions.sh b/scripts/get-versions.sh new file mode 100755 index 0000000000..bc92573bfe --- /dev/null +++ b/scripts/get-versions.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +set -euo pipefail + +# This script can be simplified to use go when https://github.com/jdx/mise/discussions/6374 is fixed +# e.g. go list -m -f '{{.GoVersion}}' + +module_path="github.com/pulumi/pulumi/pkg/v3" +go_mod_path="provider" +gomod="go.mod" + +if [[ "$go_mod_path" != "" && "$go_mod_path" != "." ]]; then + gomod="$go_mod_path/$gomod" +fi + +if [[ ! -f "$gomod" ]]; then + echo "missing $gomod" >&2 + exit 1 +fi + +raw_version=$(awk -v module="$module_path" ' + $1 == module || $2 == module { + for (i = 1; i <= NF; i++) { + if ($i ~ /^v[0-9]/) { + sub(/^v/, "", $i) + print $i + exit + } + } + } +' "$gomod") + +if [[ -z "${raw_version:-}" ]]; then + echo "failed to determine Pulumi version from $gomod" >&2 + exit 1 +fi + +echo "PULUMI_VERSION_MISE=$raw_version" +export PULUMI_VERSION_MISE=$raw_version + +# Prefer the toolchain directive if present, otherwise fall back to the `go` version line +go_toolchain=$(awk '/^toolchain[[:space:]]+go[0-9]/{ print $2; exit }' "$gomod") + +if [[ -n "${go_toolchain:-}" ]]; then + go_version=${go_toolchain#go} +else + go_version=$(awk '/^go[[:space:]]+[0-9]/{ print $2; exit }' "$gomod") +fi + +if [[ -z "${go_version:-}" ]]; then + echo "failed to determine Go version from $gomod" >&2 + exit 1 +fi + +echo "GO_VERSION_MISE=$go_version" +export GO_VERSION_MISE=$go_version