From 93f5b810f017b218cbe363a80a9deaf5c3999d7e Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:05:09 -0800 Subject: [PATCH] Update GitHub Actions workflows. (#471) This PR was automatically generated by the update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt repo, from commit fbc688d36a0d5f4b15970560c7e4e8f780f49c47. --- .github/workflows/publish.yml | 2 +- .github/workflows/upgrade-provider.yml | 11 ++++++++++- Makefile | 1 - 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b6bd38a..8fc19d9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -94,7 +94,7 @@ jobs: - name: Upload Provider Binaries run: aws s3 cp dist s3://get.pulumi.com/releases/plugins/ --recursive - name: Create GH Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 if: inputs.isPrerelease == false with: tag_name: v${{ inputs.version }} diff --git a/.github/workflows/upgrade-provider.yml b/.github/workflows/upgrade-provider.yml index 22386fa..7d0056b 100644 --- a/.github/workflows/upgrade-provider.yml +++ b/.github/workflows/upgrade-provider.yml @@ -7,7 +7,7 @@ on: version: description: | The version of the upstream provider to upgrade to, without the 'v' prefix - + If no version is specified, it will be inferred from the upstream provider's release tags. required: false type: string @@ -55,7 +55,16 @@ jobs: run: echo "version=${{ github.event.inputs.version || steps.upstream_version.outputs.latest_version }}" >> "$GITHUB_OUTPUT" shell: bash - name: Attempt provider upgrade + id: upgrade_provider # Only attempt the upgrade if we have a target version if: steps.target_version.outputs.version != '' + # Don't mark the build as failed if we can't auto-open a PR as we've already opened the upgrade issue for tracking + continue-on-error: true run: upgrade-provider "${{ github.repository }}" --kind="all" --target-version="${{ steps.target_version.outputs.version }}" shell: bash + - name: Comment on upgrade issue if automated PR failed + if: steps.upgrade_provider.outcome == 'failure' + shell: bash + run: | + issue_number=$(gh issue list --search "pulumiupgradeproviderissue" --repo "${{ github.repository }}" --json=number --jq=".[0].number") + gh issue comment "${issue_number}" --repo "${{ github.repository }}" --body "Failed to create automatic PR: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/" diff --git a/Makefile b/Makefile index 329e735..dda7a38 100644 --- a/Makefile +++ b/Makefile @@ -179,7 +179,6 @@ bin/pulumi-java-gen: .pulumi-java-gen.version # - Run make ci-mgmt to apply the change locally. # ci-mgmt: .ci-mgmt.yaml - find .github/workflows/*.yml -type f ! -name "$(PACK)*.yml" -delete go run github.com/pulumi/ci-mgmt/provider-ci@master generate \ --name $(ORG)/pulumi-$(PACK) \ --out . \