diff --git a/.github/actions/download-bin/action.yml b/.github/actions/download-bin/action.yml index 9e3114c4c1..192d039ef6 100644 --- a/.github/actions/download-bin/action.yml +++ b/.github/actions/download-bin/action.yml @@ -5,7 +5,7 @@ runs: using: "composite" steps: - name: Download provider + tfgen binaries - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.1.8 with: name: gcp-provider.tar.gz path: ${{ github.workspace }}/bin diff --git a/.github/actions/download-sdk/action.yml b/.github/actions/download-sdk/action.yml index 1fd54841b4..272e331770 100644 --- a/.github/actions/download-sdk/action.yml +++ b/.github/actions/download-sdk/action.yml @@ -10,7 +10,7 @@ runs: using: "composite" steps: - name: Download ${{ inputs.language }} SDK - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.1.8 with: name: ${{ inputs.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/ diff --git a/.github/actions/upload-bin/action.yml b/.github/actions/upload-bin/action.yml index c599813fdf..3d1543a652 100644 --- a/.github/actions/upload-bin/action.yml +++ b/.github/actions/upload-bin/action.yml @@ -8,7 +8,7 @@ runs: shell: bash run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-gcp pulumi-tfgen-gcp - name: Upload artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.3 with: name: gcp-provider.tar.gz path: ${{ github.workspace }}/bin/provider.tar.gz diff --git a/.github/actions/upload-sdk/action.yml b/.github/actions/upload-sdk/action.yml index 77d4849426..c8c88de969 100644 --- a/.github/actions/upload-sdk/action.yml +++ b/.github/actions/upload-sdk/action.yml @@ -13,7 +13,7 @@ runs: shell: bash run: tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} . - name: Upload artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.3 with: name: ${{ inputs.language }}-sdk.tar.gz path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz diff --git a/.github/workflows/build_provider.yml b/.github/workflows/build_provider.yml index 94a9c9a34c..be03007f63 100644 --- a/.github/workflows/build_provider.yml +++ b/.github/workflows/build_provider.yml @@ -30,7 +30,7 @@ jobs: arch: amd64 steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Setup tools @@ -40,7 +40,7 @@ jobs: - name: Prepare local workspace before restoring previously built run: make prepare_local_workspace - name: Download schema-embed.json - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.1.8 with: # Use a pattern to avoid failing if the artifact doesn't exist pattern: schema-embed.* @@ -48,14 +48,11 @@ jobs: merge-multiple: true path: provider/cmd/pulumi-resource-gcp/schema-embed.json - name: Restore makefile progress - uses: actions/download-artifact@v4 - with: - name: prerequisites.make - path: .make + run: make --touch provider schema - name: Build & package provider run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }} - name: Upload artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.3 with: name: pulumi-resource-gcp-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz path: bin/pulumi-resource-gcp-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz diff --git a/.github/workflows/build_sdk.yml b/.github/workflows/build_sdk.yml index fbc10719ce..272b050c45 100644 --- a/.github/workflows/build_sdk.yml +++ b/.github/workflows/build_sdk.yml @@ -49,7 +49,7 @@ jobs: - java steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Cache examples generation @@ -69,10 +69,7 @@ jobs: - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Restore makefile progress - uses: actions/download-artifact@v4 - with: - name: prerequisites.make - path: .make + run: make --touch provider schema - name: Build SDK run: make build_${{ matrix.language }} - name: Check worktree clean @@ -88,9 +85,3 @@ jobs: uses: ./.github/actions/upload-sdk with: language: ${{ matrix.language }} - - name: Save makefile progress - uses: actions/upload-artifact@v4 - with: - name: build_${{ matrix.language }}.make - path: .make - include-hidden-files: true diff --git a/.github/workflows/command-dispatch.yml b/.github/workflows/command-dispatch.yml index 15598196b0..0426bbe15e 100644 --- a/.github/workflows/command-dispatch.yml +++ b/.github/workflows/command-dispatch.yml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - uses: peter-evans/slash-command-dispatch@v4 diff --git a/.github/workflows/community-moderation.yml b/.github/workflows/community-moderation.yml index fc701df62e..0a7dd4bc05 100644 --- a/.github/workflows/community-moderation.yml +++ b/.github/workflows/community-moderation.yml @@ -8,24 +8,24 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - id: schema_changed name: Check for diff in schema - uses: dorny/paths-filter@v2 + uses: dorny/paths-filter@v2.12.0 with: filters: "changed: 'provider/cmd/**/schema.json'" - id: sdk_changed if: steps.schema_changed.outputs.changed == 'false' name: Check for diff in sdk/** - uses: dorny/paths-filter@v2 + uses: dorny/paths-filter@v2.12.0 with: filters: "changed: 'sdk/**'" - if: steps.sdk_changed.outputs.changed == 'true' && github.event.pull_request.head.repo.full_name != github.repository name: Send codegen warning as comment on PR - uses: thollander/actions-comment-pull-request@v2 + uses: thollander/actions-comment-pull-request@v2.5.0 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} message: > diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml index 6193e5db37..0e0e01ea9c 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/license.yml @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Setup tools diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5f919dd5ab..604748f5f7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Install go diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 88aff68711..7b63b402f2 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -63,11 +63,11 @@ jobs: tool-cache: false swap-storage: false - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 + uses: aws-actions/configure-aws-credentials@v4.0.2 with: aws-access-key-id: ${{ secrets.AWS_CORP_S3_UPLOAD_ACCESS_KEY_ID }} aws-region: us-west-2 @@ -145,7 +145,7 @@ jobs: PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Setup tools @@ -161,10 +161,7 @@ jobs: with: language: ${{ matrix.language }} - name: Restore makefile progress - uses: actions/download-artifact@v4 - with: - name: build_${{ matrix.language }}.make - path: .make + run: make --touch provider schema build_${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps @@ -173,7 +170,7 @@ jobs: pip3 install virtualenv==20.0.23 pip3 install pipenv - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v2 + uses: google-github-actions/auth@v2.1.7 with: service_account: ${{ env.GOOGLE_CI_SERVICE_ACCOUNT_EMAIL }} workload_identity_provider: projects/${{ env.GOOGLE_PROJECT_NUMBER @@ -181,7 +178,7 @@ jobs: env.GOOGLE_CI_WORKLOAD_IDENTITY_POOL }}/providers/${{ env.GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER }} - name: Setup gcloud auth - uses: google-github-actions/setup-gcloud@v2 + uses: google-github-actions/setup-gcloud@v2.1.2 with: install_components: gke-gcloud-auth-plugin - name: Install dependencies diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 0ff24f64ce..2692f43ecf 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -87,7 +87,7 @@ jobs: PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Setup tools @@ -103,10 +103,7 @@ jobs: with: language: ${{ matrix.language }} - name: Restore makefile progress - uses: actions/download-artifact@v4 - with: - name: build_${{ matrix.language }}.make - path: .make + run: make --touch provider schema build_${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps @@ -115,7 +112,7 @@ jobs: pip3 install virtualenv==20.0.23 pip3 install pipenv - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v2 + uses: google-github-actions/auth@v2.1.7 with: service_account: ${{ env.GOOGLE_CI_SERVICE_ACCOUNT_EMAIL }} workload_identity_provider: projects/${{ env.GOOGLE_PROJECT_NUMBER @@ -123,7 +120,7 @@ jobs: env.GOOGLE_CI_WORKLOAD_IDENTITY_POOL }}/providers/${{ env.GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER }} - name: Setup gcloud auth - uses: google-github-actions/setup-gcloud@v2 + uses: google-github-actions/setup-gcloud@v2.1.2 with: install_components: gke-gcloud-auth-plugin - name: Install dependencies diff --git a/.github/workflows/prerequisites.yml b/.github/workflows/prerequisites.yml index 70dc52053a..1928e89fe7 100644 --- a/.github/workflows/prerequisites.yml +++ b/.github/workflows/prerequisites.yml @@ -51,7 +51,7 @@ jobs: version: ${{ steps.provider-version.outputs.version }} steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - uses: pulumi/provider-version-action@v1 @@ -85,15 +85,9 @@ jobs: schema-tools compare -r github://api.github.com/pulumi -p gcp -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-gcp/schema.json; echo "$EOF"; } >> "$GITHUB_ENV" - - name: Save makefile progress - uses: actions/upload-artifact@v4 - with: - name: prerequisites.make - path: .make - include-hidden-files: true - if: inputs.is_pr && inputs.is_automated == false name: Comment on PR with Details of Schema Check - uses: thollander/actions-comment-pull-request@v2 + uses: thollander/actions-comment-pull-request@v2.5.0 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} comment_tag: schemaCheck @@ -107,7 +101,7 @@ jobs: uses: ./.github/actions/upload-bin - name: Upload schema-embed.json - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.4.3 with: name: schema-embed.json path: provider/cmd/pulumi-resource-gcp/schema-embed.json diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 337dbfb269..bc59f38220 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -54,7 +54,7 @@ jobs: if: inputs.skipGoSdk && inputs.isPrerelease == false run: echo "Can't skip Go SDK for stable releases. This is likely a bug in the calling workflow." && exit 1 - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Setup tools @@ -62,7 +62,7 @@ jobs: with: tools: pulumictl, pulumicli, go, schema-tools - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 + uses: aws-actions/configure-aws-credentials@v4.0.2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-region: us-east-2 @@ -74,7 +74,7 @@ jobs: - name: Create dist directory run: mkdir -p dist - name: Download provider assets - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.1.8 with: pattern: pulumi-resource-gcp-v${{ inputs.version }}-* path: dist @@ -118,7 +118,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: # Persist credentials so we can push back to the repo persist-credentials: true @@ -178,7 +178,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Clean up release labels diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 70c5576348..b62c9f6530 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -32,11 +32,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Comment PR - uses: thollander/actions-comment-pull-request@v2 + uses: thollander/actions-comment-pull-request@v2.5.0 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} message: > diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf561afbc5..d7fbf20591 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,7 +93,7 @@ jobs: PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Setup tools @@ -109,10 +109,7 @@ jobs: with: language: ${{ matrix.language }} - name: Restore makefile progress - uses: actions/download-artifact@v4 - with: - name: build_${{ matrix.language }}.make - path: .make + run: make --touch provider schema build_${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps @@ -121,7 +118,7 @@ jobs: pip3 install virtualenv==20.0.23 pip3 install pipenv - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v2 + uses: google-github-actions/auth@v2.1.7 with: service_account: ${{ env.GOOGLE_CI_SERVICE_ACCOUNT_EMAIL }} workload_identity_provider: projects/${{ env.GOOGLE_PROJECT_NUMBER @@ -129,7 +126,7 @@ jobs: env.GOOGLE_CI_WORKLOAD_IDENTITY_POOL }}/providers/${{ env.GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER }} - name: Setup gcloud auth - uses: google-github-actions/setup-gcloud@v2 + uses: google-github-actions/setup-gcloud@v2.1.2 with: install_components: gke-gcloud-auth-plugin - name: Install dependencies diff --git a/.github/workflows/release_command.yml b/.github/workflows/release_command.yml index f199952c88..ea43de936d 100644 --- a/.github/workflows/release_command.yml +++ b/.github/workflows/release_command.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Should release PR diff --git a/.github/workflows/resync-build.yml b/.github/workflows/resync-build.yml index ae36b28610..5343597848 100644 --- a/.github/workflows/resync-build.yml +++ b/.github/workflows/resync-build.yml @@ -33,12 +33,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: # Persist credentials so we can push a new branch. persist-credentials: true - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: path: ci-mgmt repository: pulumi/ci-mgmt diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 8dcf90b08a..df96393ec7 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -135,13 +135,13 @@ jobs: PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: ref: ${{ env.PR_COMMIT_SHA }} persist-credentials: false - name: Checkout p/examples if: matrix.testTarget == 'pulumiExamples' - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: repository: pulumi/examples path: p-examples @@ -158,10 +158,7 @@ jobs: with: language: ${{ matrix.language }} - name: Restore makefile progress - uses: actions/download-artifact@v4 - with: - name: build_${{ matrix.language }}.make - path: .make + run: make --touch provider schema build_${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps @@ -170,7 +167,7 @@ jobs: pip3 install virtualenv==20.0.23 pip3 install pipenv - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v2 + uses: google-github-actions/auth@v2.1.7 with: service_account: ${{ env.GOOGLE_CI_SERVICE_ACCOUNT_EMAIL }} workload_identity_provider: projects/${{ env.GOOGLE_PROJECT_NUMBER @@ -178,7 +175,7 @@ jobs: env.GOOGLE_CI_WORKLOAD_IDENTITY_POOL }}/providers/${{ env.GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER }} - name: Setup gcloud auth - uses: google-github-actions/setup-gcloud@v2 + uses: google-github-actions/setup-gcloud@v2.1.2 with: install_components: gke-gcloud-auth-plugin - name: Install dependencies diff --git a/.github/workflows/upgrade-bridge.yml b/.github/workflows/upgrade-bridge.yml index dcfea70e75..b47d57a2d1 100644 --- a/.github/workflows/upgrade-bridge.yml +++ b/.github/workflows/upgrade-bridge.yml @@ -49,16 +49,23 @@ on: required: false type: boolean default: false + +permissions: + contents: write + issues: write + pull-requests: write + env: - GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + GH_TOKEN: ${{ secrets.PULUMI_PROVIDER_AUTOMATION_TOKEN || secrets.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: upgrade_provider: name: upgrade-provider runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Setup tools diff --git a/.github/workflows/upgrade-provider.yml b/.github/workflows/upgrade-provider.yml index 6e7ec04dce..174d3f496f 100644 --- a/.github/workflows/upgrade-provider.yml +++ b/.github/workflows/upgrade-provider.yml @@ -22,16 +22,22 @@ on: # 3 AM UTC ~ 8 PM PDT / 7 PM PST daily. Time chosen to run during off hours. - cron: 0 3 * * * +permissions: + contents: write + issues: write + pull-requests: write + env: - GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }} + GH_TOKEN: ${{ secrets.PULUMI_PROVIDER_AUTOMATION_TOKEN || secrets.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: upgrade_provider: name: upgrade-provider runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: # Persist credentials so upgrade-provider can push a new branch. persist-credentials: true diff --git a/.github/workflows/verify-release.yml b/.github/workflows/verify-release.yml index 89a77b7298..5b89b26502 100644 --- a/.github/workflows/verify-release.yml +++ b/.github/workflows/verify-release.yml @@ -77,7 +77,7 @@ jobs: runs-on: ${{ matrix.runner }} steps: - name: Checkout Repo - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Setup tools diff --git a/Makefile b/Makefile index e09133964c..893b02741b 100644 --- a/Makefile +++ b/Makefile @@ -246,12 +246,12 @@ tfgen_no_deps: .make/schema .make/schema: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache .make/schema: export PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION := $(PULUMI_CONVERT) .make/schema: export PULUMI_MISSING_DOCS_ERROR := $(PULUMI_MISSING_DOCS_ERROR) -.make/schema: bin/$(TFGEN) provider/resources.go provider/go.mod .make/install_plugins .make/upstream +.make/schema: bin/$(TFGEN) .make/install_plugins .make/upstream $(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER) (cd provider && VERSION=$(VERSION_GENERIC) go generate cmd/$(PROVIDER)/main.go) @touch $@ tfgen_build_only: bin/$(TFGEN) -bin/$(TFGEN): +bin/$(TFGEN): provider/*.go provider/go.* .make/upstream (cd provider && go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o $(WORKING_DIR)/bin/$(TFGEN) -ldflags "$(LDFLAGS_PROJ_VERSION) $(LDFLAGS_EXTRAS)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(TFGEN)) .PHONY: tfgen schema tfgen_no_deps tfgen_build_only