-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[internal] Update GitHub Actions workflow files (#141)
- Loading branch information
1 parent
538899e
commit c58a164
Showing
2 changed files
with
126 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ jobs: | |
}} | ||
committer: pulumi-bot <[email protected]> | ||
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 }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
env: | ||
FASTLY_API_KEY: ${{ secrets.FASTLY_API_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} | ||
PROVIDER: fastly | ||
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-fastly | ||
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/[email protected] | ||
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/[email protected] | ||
with: | ||
author: pulumi-bot <[email protected]> | ||
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 <[email protected]> | ||
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/[email protected] | ||
with: | ||
author: pulumi-bot <[email protected]> | ||
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 <[email protected]> | ||
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 |