diff --git a/.github/workflows/build_sdk.yml b/.github/workflows/build_sdk.yml index cffc0662d..a29bbc1cb 100644 --- a/.github/workflows/build_sdk.yml +++ b/.github/workflows/build_sdk.yml @@ -1,7 +1,11 @@ name: "Build SDK" on: - workflow_call: {} + workflow_call: + inputs: + version: + required: true + type: string env: ARM_CLIENT_ID: d3b6ec3a-36fe-46c9-b3d9-5856a2e0e73c @@ -27,6 +31,7 @@ env: SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} TF_APPEND_USER_AGENT: pulumi + PROVIDER_VERSION: ${{ inputs.version }} jobs: build_sdk: @@ -44,9 +49,6 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v4 - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - name: Cache examples generation uses: actions/cache@v4 with: diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index dbfc1050e..3cc043758 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -25,11 +25,21 @@ env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} TF_APPEND_USER_AGENT: pulumi jobs: + prerequisites: + uses: ./.github/workflows/prerequisites.yml + secrets: inherit + with: + default_branch: ${{ github.event.repository.default_branch }} + is_pr: ${{ github.event_name == 'pull_request' }} + is_automated: ${{ github.actor == 'dependabot[bot]' }} + build_sdk: name: build_sdk needs: prerequisites uses: ./.github/workflows/build_sdk.yml secrets: inherit + with: + version: ${{ needs.prerequisites.outputs.version }} generate_coverage_data: continue-on-error: true @@ -93,17 +103,11 @@ jobs: name: License Check uses: ./.github/workflows/license.yml secrets: inherit - prerequisites: - uses: ./.github/workflows/prerequisites.yml - secrets: inherit - with: - default_branch: ${{ github.event.repository.default_branch }} - is_pr: ${{ github.event_name == 'pull_request' }} - is_automated: ${{ github.actor == 'dependabot[bot]' }} publish: name: publish needs: + - prerequisites - test - license_check runs-on: ubuntu-latest @@ -142,13 +146,11 @@ jobs: role-external-id: upload-pulumi-release role-session-name: azuread@githubActions role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - - id: version - uses: pulumi/provider-version-action@v1 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 env: - GORELEASER_CURRENT_TAG: v${{ steps.version.outputs.version }} - PROVIDER_VERSION: ${{ steps.version.outputs.version }} + GORELEASER_CURRENT_TAG: v${{ needs.prerequisites.outputs.version }} + PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} with: args: -p 3 -f .goreleaser.prerelease.yml --rm-dist --skip-validate --timeout 60m0s @@ -162,16 +164,16 @@ jobs: status: ${{ job.status }} publish_sdk: name: publish_sdk - needs: publish + needs: + - prerequisites + - publish runs-on: ubuntu-latest steps: - - id: version - uses: pulumi/provider-version-action@v1 - name: Publish SDKs uses: pulumi/pulumi-package-publisher@v0.0.18 with: sdk: all - version: ${{ steps.version.outputs.version }} + version: ${{ needs.prerequisites.outputs.version }} dotnet-version: "6.0.x" java-version: "11" node-version: "20.x" @@ -207,17 +209,18 @@ jobs: test: name: test - needs: build_sdk + needs: + - prerequisites + - build_sdk permissions: contents: read id-token: write runs-on: ubuntu-latest + env: + PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: - name: Checkout Repo uses: actions/checkout@v4 - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - name: Install Go uses: actions/setup-go@v5 with: diff --git a/.github/workflows/nightly-test.yml b/.github/workflows/nightly-test.yml index 90fdc27a6..d19ee393e 100644 --- a/.github/workflows/nightly-test.yml +++ b/.github/workflows/nightly-test.yml @@ -25,12 +25,6 @@ env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} TF_APPEND_USER_AGENT: pulumi jobs: - build_sdk: - name: build_sdk - needs: prerequisites - uses: ./.github/workflows/build_sdk.yml - secrets: inherit - prerequisites: uses: ./.github/workflows/prerequisites.yml secrets: inherit @@ -39,19 +33,28 @@ jobs: is_pr: ${{ github.event_name == 'pull_request' }} is_automated: ${{ github.actor == 'dependabot[bot]' }} + build_sdk: + name: build_sdk + needs: prerequisites + uses: ./.github/workflows/build_sdk.yml + secrets: inherit + with: + version: ${{ needs.prerequisites.outputs.version }} + test: name: test - needs: build_sdk + needs: + - prerequisites + - build_sdk permissions: contents: read id-token: write runs-on: ubuntu-latest + env: + PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: - name: Checkout Repo uses: actions/checkout@v4 - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - name: Install Go uses: actions/setup-go@v5 with: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 9097fbe41..3421a9280 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -26,11 +26,21 @@ env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} TF_APPEND_USER_AGENT: pulumi jobs: + prerequisites: + uses: ./.github/workflows/prerequisites.yml + secrets: inherit + with: + default_branch: ${{ github.event.repository.default_branch }} + is_pr: ${{ github.event_name == 'pull_request' }} + is_automated: ${{ github.actor == 'dependabot[bot]' }} + build_sdk: name: build_sdk needs: prerequisites uses: ./.github/workflows/build_sdk.yml secrets: inherit + with: + version: ${{ needs.prerequisites.outputs.version }} lint: name: lint @@ -40,17 +50,11 @@ jobs: name: License Check uses: ./.github/workflows/license.yml secrets: inherit - prerequisites: - uses: ./.github/workflows/prerequisites.yml - secrets: inherit - with: - default_branch: ${{ github.event.repository.default_branch }} - is_pr: ${{ github.event_name == 'pull_request' }} - is_automated: ${{ github.actor == 'dependabot[bot]' }} publish: name: publish needs: + - prerequisites - test - license_check runs-on: ubuntu-latest @@ -89,13 +93,11 @@ jobs: role-external-id: upload-pulumi-release role-session-name: azuread@githubActions role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - - id: version - uses: pulumi/provider-version-action@v1 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 env: - GORELEASER_CURRENT_TAG: v${{ steps.version.outputs.version }} - PROVIDER_VERSION: ${{ steps.version.outputs.version }} + GORELEASER_CURRENT_TAG: v${{ needs.prerequisites.outputs.version }} + PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} with: args: -p 3 -f .goreleaser.prerelease.yml --rm-dist --skip-validate --timeout 60m0s @@ -109,16 +111,16 @@ jobs: status: ${{ job.status }} publish_sdk: name: publish_sdk - needs: publish + needs: + - prerequisites + - publish runs-on: ubuntu-latest steps: - - id: version - uses: pulumi/provider-version-action@v1 - name: Publish SDKs uses: pulumi/pulumi-package-publisher@v0.0.18 with: sdk: all - version: ${{ steps.version.outputs.version }} + version: ${{ needs.prerequisites.outputs.version }} dotnet-version: "6.0.x" java-version: "11" node-version: "20.x" @@ -136,7 +138,9 @@ jobs: uses: rtCamp/action-slack-notify@v2 publish_go_sdk: name: publish_go_sdk - needs: publish_sdk + needs: + - prerequisites + - publish_sdk runs-on: ubuntu-latest steps: - name: Checkout Repo @@ -146,8 +150,6 @@ jobs: with: tag: v0.0.46 repo: pulumi/pulumictl - - id: version - uses: pulumi/provider-version-action@v1 - name: Download Go SDK uses: actions/download-artifact@v4 with: @@ -163,7 +165,7 @@ jobs: base-ref: ${{ github.sha }} source: sdk path: sdk - version: ${{ steps.version.outputs.version }} + version: ${{ needs.prerequisites.outputs.version }} additive: false # Avoid including other language SDKs & artifacts in the commit files: | @@ -172,17 +174,18 @@ jobs: !*.tar.gz test: name: test - needs: build_sdk + needs: + - prerequisites + - build_sdk permissions: contents: read id-token: write runs-on: ubuntu-latest + env: + PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: - name: Checkout Repo uses: actions/checkout@v4 - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - name: Install Go uses: actions/setup-go@v5 with: diff --git a/.github/workflows/prerequisites.yml b/.github/workflows/prerequisites.yml index 92ee179b9..d719f0f4b 100644 --- a/.github/workflows/prerequisites.yml +++ b/.github/workflows/prerequisites.yml @@ -12,6 +12,10 @@ on: default_branch: type: string required: true + outputs: + version: + description: "Provider version being built" + value: ${{ jobs.prerequisites.outputs.version }} env: ARM_CLIENT_ID: d3b6ec3a-36fe-46c9-b3d9-5856a2e0e73c @@ -42,10 +46,13 @@ jobs: prerequisites: name: prerequisites runs-on: ubuntu-latest + outputs: + version: ${{ steps.provider-version.outputs.version }} steps: - name: Checkout Repo uses: actions/checkout@v4 - uses: pulumi/provider-version-action@v1 + id: provider-version with: set-env: 'PROVIDER_VERSION' - name: Cache examples generation diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d4243428..225a0ff75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,11 +25,21 @@ env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} TF_APPEND_USER_AGENT: pulumi jobs: + prerequisites: + uses: ./.github/workflows/prerequisites.yml + secrets: inherit + with: + default_branch: ${{ github.event.repository.default_branch }} + is_pr: ${{ github.event_name == 'pull_request' }} + is_automated: ${{ github.actor == 'dependabot[bot]' }} + build_sdk: name: build_sdk needs: prerequisites uses: ./.github/workflows/build_sdk.yml secrets: inherit + with: + version: ${{ needs.prerequisites.outputs.version }} create_docs_build: name: create_docs_build @@ -56,17 +66,11 @@ jobs: name: License Check uses: ./.github/workflows/license.yml secrets: inherit - prerequisites: - uses: ./.github/workflows/prerequisites.yml - secrets: inherit - with: - default_branch: ${{ github.event.repository.default_branch }} - is_pr: ${{ github.event_name == 'pull_request' }} - is_automated: ${{ github.actor == 'dependabot[bot]' }} publish: name: publish needs: + - prerequisites - test - license_check runs-on: ubuntu-latest @@ -105,13 +109,11 @@ jobs: role-external-id: upload-pulumi-release role-session-name: azuread@githubActions role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} - - id: version - uses: pulumi/provider-version-action@v1 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 env: - GORELEASER_CURRENT_TAG: v${{ steps.version.outputs.version }} - PROVIDER_VERSION: ${{ steps.version.outputs.version }} + GORELEASER_CURRENT_TAG: v${{ needs.prerequisites.outputs.version }} + PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} with: args: -p 3 release --rm-dist --timeout 60m0s version: latest @@ -124,16 +126,16 @@ jobs: status: ${{ job.status }} publish_sdk: name: publish_sdk - needs: publish + needs: + - prerequisites + - publish runs-on: ubuntu-latest steps: - - id: version - uses: pulumi/provider-version-action@v1 - name: Publish SDKs uses: pulumi/pulumi-package-publisher@v0.0.18 with: sdk: all - version: ${{ steps.version.outputs.version }} + version: ${{ needs.prerequisites.outputs.version }} dotnet-version: "6.0.x" java-version: "11" node-version: "20.x" @@ -151,7 +153,9 @@ jobs: uses: rtCamp/action-slack-notify@v2 tag_sdk: name: tag_sdk - needs: publish_sdk + needs: + - prerequisites + - publish_sdk runs-on: ubuntu-latest steps: - name: Checkout Repo @@ -161,8 +165,6 @@ jobs: with: tag: v0.0.46 repo: pulumi/pulumictl - - id: version - uses: pulumi/provider-version-action@v1 - name: Download Go SDK uses: actions/download-artifact@v4 with: @@ -178,7 +180,7 @@ jobs: base-ref: ${{ github.sha }} source: sdk path: sdk - version: ${{ steps.version.outputs.version }} + version: ${{ needs.prerequisites.outputs.version }} additive: false # Avoid including other language SDKs & artifacts in the commit files: | @@ -205,17 +207,18 @@ jobs: test: name: test - needs: build_sdk + needs: + - prerequisites + - build_sdk permissions: contents: read id-token: write runs-on: ubuntu-latest + env: + PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: - name: Checkout Repo uses: actions/checkout@v4 - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - name: Install Go uses: actions/setup-go@v5 with: diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index c22c81747..37fdb81c9 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -31,6 +31,16 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: + prerequisites: + if: github.event_name == 'repository_dispatch' || + github.event.pull_request.head.repo.full_name == github.repository + uses: ./.github/workflows/prerequisites.yml + secrets: inherit + with: + default_branch: ${{ github.event.repository.default_branch }} + is_pr: ${{ github.event_name == 'pull_request' }} + is_automated: ${{ github.actor == 'dependabot[bot]' }} + build_sdk: if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository @@ -38,6 +48,8 @@ jobs: needs: prerequisites uses: ./.github/workflows/build_sdk.yml secrets: inherit + with: + version: ${{ needs.prerequisites.outputs.version }} comment-notification: if: github.event_name == 'repository_dispatch' @@ -60,16 +72,6 @@ jobs: name: lint uses: ./.github/workflows/lint.yml secrets: inherit - prerequisites: - if: github.event_name == 'repository_dispatch' || - github.event.pull_request.head.repo.full_name == github.repository - uses: ./.github/workflows/prerequisites.yml - secrets: inherit - with: - default_branch: ${{ github.event.repository.default_branch }} - is_pr: ${{ github.event_name == 'pull_request' }} - is_automated: ${{ github.actor == 'dependabot[bot]' }} - sentinel: name: sentinel if: github.event_name == 'repository_dispatch' || @@ -96,19 +98,20 @@ jobs: if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository name: test - needs: build_sdk + needs: + - prerequisites + - build_sdk permissions: contents: read id-token: write runs-on: ubuntu-latest + env: + PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: - name: Checkout Repo uses: actions/checkout@v4 with: ref: ${{ env.PR_COMMIT_SHA }} - - uses: pulumi/provider-version-action@v1 - with: - set-env: 'PROVIDER_VERSION' - name: Checkout p/examples if: matrix.testTarget == 'pulumiExamples' uses: actions/checkout@v4