generated from pulumi/pulumi-tf-provider-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (87 loc) · 3.23 KB
/
update-bridge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULUMI_EXTRA_MAPPING_ERROR: false
PULUMI_MISSING_MAPPING_ERROR: false
jobs:
update_bridge:
name: update-bridge
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.20.1
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.5.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: ${{ env.DOTNETVERSION }}
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODEVERSION }}
registry-url: https://registry.npmjs.org
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHONVERSION }}
- name: Update pulumi-terraform-bridge
run: cd provider && go mod edit -require
github.com/pulumi/pulumi-terraform-bridge/v3@v${{
github.event.inputs.bridge_version }} && go mod tidy
- name: Update Pulumi SDK (provider/go.mod)
run: cd provider && go mod edit -require github.com/pulumi/pulumi/sdk/v3@v${{
github.event.inputs.sdk_version }} && go mod tidy
- name: Update Pulumi SDK (sdk/go.mod)
run: cd sdk && go mod edit -require github.com/pulumi/pulumi/sdk/v3@v${{
github.event.inputs.sdk_version }} && go mod tidy
- run: make tfgen
- run: make build_sdks
- id: create-pr
name: Create PR
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-bridge
workflow in this repository.
branch: pulumi-bot/bridge-v${{ github.event.inputs.bridge_version }}-${{
github.run_id}}
commit-message: Update pulumi-terraform-bridge to v${{
github.event.inputs.bridge_version }}
committer: pulumi-bot <bot@pulumi.com>
labels: impact/no-changelog-required
team-reviewers: platform-integrations
title: Update pulumi-terraform-bridge to v${{ github.event.inputs.bridge_version }}
token: ${{ secrets.PULUMI_BOT_TOKEN }}
- if: steps.create-pr.outputs.pull-request-operation == 'created' &&
github.event.inputs.automerge == 'true'
run: gh pr merge --auto --squash ${{ steps.create-pr.outputs.pull-request-number }}
name: Update pulumi-terraform-bridge
on:
workflow_dispatch:
inputs:
automerge:
default: false
description: Mark created PR for auto-merging?
required: true
type: boolean
bridge_version:
description: The version of pulumi/pulumi-terraform-bridge to update to. Do not
include the 'v' prefix. Must be major version 3.
required: true
type: string
sdk_version:
description: The version of pulumi/pulumi/sdk to update to. Do not include the
'v' prefix. Must be major version 3.
required: true
type: string