Skip to content

Commit 1512d8d

Browse files
pulumi-botiwahbe
andauthored
Update GitHub Actions workflows. (#358)
This PR was automatically generated by the update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt repo, from commit 4372b1f696203493bd59ca973e67a90cfc24460a. --------- Co-authored-by: Ian Wahbe <ian@wahbe.com>
1 parent b97f1f0 commit 1512d8d

File tree

6 files changed

+29
-5
lines changed

6 files changed

+29
-5
lines changed

.github/workflows/upgrade-bridge.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
- upgrade-bridge
88
workflow_dispatch:
99
inputs:
10+
kind:
11+
description: Overrides the kind of upgrade. Must be one of `all`, `bridge`, `provider`, `code`, `pf`, or `pulumi`.
12+
required: false
13+
type: string
14+
default: "bridge"
1015
target-bridge-version:
1116
description: pulumi-terraform-bridge version or hash reference
1217
required: false
@@ -50,7 +55,7 @@ jobs:
5055
if: github.event_name == 'workflow_dispatch'
5156
uses: pulumi/pulumi-upgrade-provider-action@v0.0.11
5257
with:
53-
kind: bridge
58+
kind: ${{ inputs.kind }}
5459
email: bot@pulumi.com
5560
username: pulumi-bot
5661
automerge: ${{ inputs.automerge }}
@@ -62,7 +67,7 @@ jobs:
6267
if: github.event_name == 'repository_dispatch'
6368
uses: pulumi/pulumi-upgrade-provider-action@v0.0.11
6469
with:
65-
kind: bridge
70+
kind: ${{ inputs.kind }}
6671
email: bot@pulumi.com
6772
username: pulumi-bot
6873
automerge: ${{ github.event.client_payload.automerge }}

.golangci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,19 @@ linters:
1818
- structcheck
1919
- unconvert
2020
- varcheck
21+
- gci
2122
enable-all: false
2223
run:
2324
skip-files:
2425
- schema.go
2526
- pulumiManifest.go
2627
timeout: 20m
28+
linters-settings:
29+
gci:
30+
sections:
31+
- standard # Standard section: captures all standard library packages.
32+
- blank # Blank section: contains all blank imports.
33+
- default # Default section: contains all imports that could not be matched to another section type.
34+
- prefix(github.com/pulumi/) # Custom section: groups all imports with the github.com/pulumi/ prefix.
35+
- prefix(github.com/pulumi/pulumi-postgresql) # Custom section: local imports
36+
custom-order: true

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ install_plugins: .pulumi/bin/pulumi
9898
lint_provider: provider
9999
cd provider && golangci-lint run -c ../.golangci.yml
100100

101+
# `lint_provider.fix` is a utility target meant to be run manually
102+
# that will run the linter and fix errors when possible.
103+
lint_provider.fix:
104+
cd provider && golangci-lint run -c ../.golangci.yml --fix
105+
101106
# `make provider_no_deps` builds the provider binary directly, without ensuring that
102107
# `cmd/pulumi-resource-postgresql/schema.json` is valid and up to date.
103108
# To create a release ready binary, you should use `make provider`.

provider/cmd/pulumi-resource-postgresql/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ package main
1919
import (
2020
_ "embed"
2121

22+
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
23+
2224
postgresql "github.com/pulumi/pulumi-postgresql/provider/v3"
2325
"github.com/pulumi/pulumi-postgresql/provider/v3/pkg/version"
24-
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
2526
)
2627

2728
//go:embed schema-embed.json

provider/cmd/pulumi-tfgen-postgresql/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
package main
1616

1717
import (
18+
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfgen"
19+
1820
postgresql "github.com/pulumi/pulumi-postgresql/provider/v3"
1921
"github.com/pulumi/pulumi-postgresql/provider/v3/pkg/version"
20-
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfgen"
2122
)
2223

2324
func main() {

provider/resources.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ import (
2020
"unicode"
2121

2222
"github.com/cyrilgdn/terraform-provider-postgresql/postgresql"
23-
"github.com/pulumi/pulumi-postgresql/provider/v3/pkg/version"
23+
2424
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
2525
tfbridgetokens "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens"
2626
shimv2 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2"
2727
"github.com/pulumi/pulumi/sdk/v3/go/common/tokens"
28+
29+
"github.com/pulumi/pulumi-postgresql/provider/v3/pkg/version"
2830
)
2931

3032
// all of the token components used below.

0 commit comments

Comments
 (0)