Skip to content

Commit

Permalink
Update GitHub Actions workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
pulumi-bot committed Jan 28, 2022
1 parent 7a78d66 commit dfa5506
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/update-bridge.yml
Expand Up @@ -55,7 +55,7 @@ jobs:
}}
committer: pulumi-bot <bot@pulumi.com>
labels: impact/no-changelog-required
reviewers: pulumi/platform-integrations
team-reviewers: platform-integrations
title: Update pulumi-terraform-bridge to v${{ github.event.inputs.bridge_version
}}
token: ${{ secrets.PULUMI_BOT_TOKEN }}
Expand Down
125 changes: 125 additions & 0 deletions .github/workflows/update-upstream-provider.yml
@@ -0,0 +1,125 @@
env:
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
PROVIDER: digitalocean
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_API: https://api.pulumi-staging.io
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
PULUMI_PROVIDER_MAP_ERROR: true
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TRAVIS_OS_NAME: linux
UPSTREAM_PROVIDER_ORG: pulumi
UPSTREAM_PROVIDER_REPO: terraform-provider-digitalocean
jobs:
update_upstream_provider:
name: update-upstream_provider
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{matrix.goversion}}
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.2.0
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v2
- name: Setup DotNet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{matrix.dotnetversion}}
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{matrix.nodeversion}}
registry-url: https://registry.npmjs.org
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{matrix.pythonversion}}
- name: Get upstream provider sha
run: echo "UPSTREAM_PROVIDER_SHA=$(curl https://api.github.com/repos/${{ env.UPSTREAM_PROVIDER_ORG
}}/${{ env.UPSTREAM_PROVIDER_REPO }}/git/ref/tags/v${{ github.event.inputs.version
}} | jq .object.sha -r)" >> $GITHUB_ENV
- if: ${{ hashFiles('provider/shim/go.mod') != '' }}
name: Update shim/go.mod
run: cd provider/shim && go mod edit -require github.com/${{ env.UPSTREAM_PROVIDER_ORG
}}/${{ env.UPSTREAM_PROVIDER_REPO }}@${{ env.UPSTREAM_PROVIDER_SHA }} && go
mod tidy
- name: Update go.mod
run: cd provider && go mod edit -require github.com/${{ env.UPSTREAM_PROVIDER_ORG
}}/${{ env.UPSTREAM_PROVIDER_REPO }}@${{ env.UPSTREAM_PROVIDER_SHA }} && go
mod tidy
- run: make tfgen
- run: make build_sdks
- if: ${{ !github.event.inputs.linked_issue_number }}
name: Create PR (no linked issue)
uses: peter-evans/create-pull-request@v3.12.0
with:
author: pulumi-bot <bot@pulumi.com>
base: master
body: This pull request was generated automatically by the update-upstream-provider
workflow in this repository.
branch: pulumi-bot/v${{ github.event.inputs.version }}-${{ github.run_id}}
commit-message: Update ${{ env.UPSTREAM_PROVIDER_REPO }} to v${{ github.event.inputs.version
}}
committer: pulumi-bot <bot@pulumi.com>
labels: impact/no-changelog-required
team-reviewers: platform-integrations
title: Update ${{ env.UPSTREAM_PROVIDER_REPO }} to v${{ github.event.inputs.version
}}
token: ${{ secrets.PULUMI_BOT_TOKEN }}
- if: ${{ github.event.inputs.linked_issue_number }}
name: Create PR (with linked issue)
uses: peter-evans/create-pull-request@v3.12.0
with:
author: pulumi-bot <bot@pulumi.com>
base: master
body: |-
Fixes #${{ github.event.inputs.linked_issue_number }}
This pull request was generated automatically by the update-upstream-provider workflow in this repository.
branch: pulumi-bot/v${{ github.event.inputs.version }}-${{ github.run_id}}
commit-message: Update ${{ env.UPSTREAM_PROVIDER_REPO }} to v${{ github.event.inputs.version
}}
committer: pulumi-bot <bot@pulumi.com>
labels: impact/no-changelog-required
team-reviewers: platform-integrations
title: Update ${{ env.UPSTREAM_PROVIDER_REPO }} to v${{ github.event.inputs.version
}}
token: ${{ secrets.PULUMI_BOT_TOKEN }}
strategy:
fail-fast: true
matrix:
dotnetversion:
- 3.1.301
goversion:
- 1.17.x
nodeversion:
- 14.x
pythonversion:
- "3.7"
name: Update upstream provider
"on":
workflow_dispatch:
inputs:
linked_issue_number:
description: The issue number of a PR in this repository to which the generated
pull request should be linked.
required: false
type: string
version:
description: The new version of the upstream provider. Do not include the
'v' prefix.
required: true
type: string

0 comments on commit dfa5506

Please sign in to comment.