From e75f640ec965bd81d97f4c7e664c36d07475d2a7 Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Tue, 3 Dec 2024 21:14:00 -0800 Subject: [PATCH] Update GitHub Actions workflows. (#957) This PR was automatically generated by the update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt repo, from commit e7696dfaff0baa5b84126fc6971cc40e89d490cf. --- .github/actions/download-bin/action.yml | 19 +++++++++++++------ .github/actions/download-tfgen/action.yml | 17 +++++++++++++++++ .github/workflows/build_provider.yml | 1 + .github/workflows/build_sdk.yml | 4 ++-- .github/workflows/main.yml | 1 + .github/workflows/prerelease.yml | 1 + .github/workflows/prerequisites.yml | 8 ++++++-- .github/workflows/release.yml | 1 + .github/workflows/run-acceptance-tests.yml | 1 + upstream.sh | 8 +++++++- 10 files changed, 50 insertions(+), 11 deletions(-) create mode 100644 .github/actions/download-tfgen/action.yml diff --git a/.github/actions/download-bin/action.yml b/.github/actions/download-bin/action.yml index a136b898b..4487a6e47 100644 --- a/.github/actions/download-bin/action.yml +++ b/.github/actions/download-bin/action.yml @@ -1,16 +1,23 @@ -name: Download binary assets -description: Downloads the provider and tfgen binaries to `bin/`. +name: Download the provider binary +description: Downloads the provider binary to `bin/`. runs: using: "composite" steps: - - name: Download provider + tfgen binaries + + - name: Download pulumi-resource-artifactory uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: artifactory-provider.tar.gz + pattern: pulumi-resource-artifactory-*-linux-amd64.tar.gz path: ${{ github.workspace }}/bin - - name: Untar provider binaries + merge-multiple: true + + - name: Untar pulumi-resource-artifactory + shell: bash + run: | + tar -zxf ${{ github.workspace }}/bin/*amd64.tar.gz -C ${{ github.workspace}}/bin + + - name: Mark pulumi-resource-artifactory as executable shell: bash run: | - tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace}}/bin find ${{ github.workspace }} -name "pulumi-*-artifactory" -print -exec chmod +x {} \; diff --git a/.github/actions/download-tfgen/action.yml b/.github/actions/download-tfgen/action.yml new file mode 100644 index 000000000..ba628f686 --- /dev/null +++ b/.github/actions/download-tfgen/action.yml @@ -0,0 +1,17 @@ +name: Download the tfgen binary +description: Downloads the tfgen binary to `bin/`. + +runs: + using: "composite" + steps: + + - name: Download pulumi-tfgen-artifactory + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: pulumi-tfgen-artifactory + path: ${{ github.workspace }}/bin + + - name: Ensure pulumi-tfgen-artifactory is executable + shell: bash + run: | + find ${{ github.workspace }} -name "pulumi-*-artifactory" -print -exec chmod +x {} \; diff --git a/.github/workflows/build_provider.yml b/.github/workflows/build_provider.yml index a7ff2ef7b..7f19d5283 100644 --- a/.github/workflows/build_provider.yml +++ b/.github/workflows/build_provider.yml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest env: PROVIDER_VERSION: ${{ inputs.version }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} strategy: fail-fast: true matrix: diff --git a/.github/workflows/build_sdk.yml b/.github/workflows/build_sdk.yml index f7b6905cc..d7868306e 100644 --- a/.github/workflows/build_sdk.yml +++ b/.github/workflows/build_sdk.yml @@ -59,8 +59,8 @@ jobs: tools: pulumictl, pulumicli, ${{ matrix.language }} - name: Prepare local workspace run: make prepare_local_workspace - - name: Download bin - uses: ./.github/actions/download-bin + - name: Download tfgen + uses: ./.github/actions/download-tfgen - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Restore makefile progress diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 838334775..a7c56b5a9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -132,6 +132,7 @@ jobs: name: test needs: - prerequisites + - build_provider - build_sdk permissions: contents: read diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 62d071430..de9cda435 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -73,6 +73,7 @@ jobs: name: test needs: - prerequisites + - build_provider - build_sdk permissions: contents: read diff --git a/.github/workflows/prerequisites.yml b/.github/workflows/prerequisites.yml index bc2180356..59c3603f5 100644 --- a/.github/workflows/prerequisites.yml +++ b/.github/workflows/prerequisites.yml @@ -94,8 +94,12 @@ jobs: Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. - - name: Upload bin - uses: ./.github/actions/upload-bin + - name: Upload pulumi-tfgen-artifactory + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: pulumi-tfgen-artifactory + path: ${{ github.workspace }}/bin/pulumi-tfgen-artifactory + retention-days: 30 - name: Upload schema-embed.json uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c6445c9e..06fd5e6d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,6 +79,7 @@ jobs: name: test needs: - prerequisites + - build_provider - build_sdk permissions: contents: read diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index 9bd40c56e..f9b40c00c 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -121,6 +121,7 @@ jobs: name: test needs: - prerequisites + - build_provider - build_sdk permissions: contents: read diff --git a/upstream.sh b/upstream.sh index 87593cde3..640b83632 100755 --- a/upstream.sh +++ b/upstream.sh @@ -138,11 +138,14 @@ apply_patches() { # Iterating over the patches folder in sorted order, # apply the patch using a 3-way merge strategy. This mirrors the default behavior of 'git merge' cd upstream + # Allow directory to be empty + shopt -s nullglob for patch in ../patches/*.patch; do if ! git apply --3way "${patch}" --allow-empty; then err_failed_to_apply "$(basename "${patch}")" fi done + shopt -u nullglob } clean_rebases() { @@ -227,13 +230,16 @@ checkout() { # Create a new branch 'pulumi/patch-checkout' which will contain the commits for each patch git checkout -B pulumi/patch-checkout + # Allow directory to be empty + shopt -s nullglob for patch in ../patches/*.patch; do if ! git am --3way "${patch}"; then err_failed_to_apply "$(basename "${patch}")" fi done + shopt -u nullglob - cat <