Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions workflows. #477

Merged
merged 2 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/upgrade-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
- upgrade-bridge
workflow_dispatch:
inputs:
kind:
description: Overrides the kind of upgrade. Must be one of `all`, `bridge`, `provider`, `code`, `pf`, or `pulumi`.
required: false
type: string
default: "bridge"
target-bridge-version:
description: pulumi-terraform-bridge version or hash reference
required: false
Expand Down Expand Up @@ -50,7 +55,7 @@ jobs:
if: github.event_name == 'workflow_dispatch'
uses: pulumi/pulumi-upgrade-provider-action@v0.0.11
with:
kind: bridge
kind: ${{ inputs.kind }}
email: bot@pulumi.com
username: pulumi-bot
automerge: ${{ inputs.automerge }}
Expand All @@ -62,7 +67,7 @@ jobs:
if: github.event_name == 'repository_dispatch'
uses: pulumi/pulumi-upgrade-provider-action@v0.0.11
with:
kind: bridge
kind: ${{ inputs.kind }}
email: bot@pulumi.com
username: pulumi-bot
automerge: ${{ github.event.client_payload.automerge }}
Expand Down
10 changes: 10 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,19 @@ linters:
- structcheck
- unconvert
- varcheck
- gci
enable-all: false
run:
skip-files:
- schema.go
- pulumiManifest.go
timeout: 20m
linters-settings:
gci:
sections:
- standard # Standard section: captures all standard library packages.
- blank # Blank section: contains all blank imports.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/pulumi/) # Custom section: groups all imports with the github.com/pulumi/ prefix.
- prefix(github.com/pulumi/pulumi-gitlab) # Custom section: local imports
custom-order: true
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ install_plugins: .pulumi/bin/pulumi
lint_provider: provider
cd provider && golangci-lint run -c ../.golangci.yml

# `lint_provider.fix` is a utility target meant to be run manually
# that will run the linter and fix errors when possible.
lint_provider.fix:
cd provider && golangci-lint run -c ../.golangci.yml --fix

# `make provider_no_deps` builds the provider binary directly, without ensuring that
# `cmd/pulumi-resource-gitlab/schema.json` is valid and up to date.
# To create a release ready binary, you should use `make provider`.
Expand Down
4 changes: 3 additions & 1 deletion provider/cmd/pulumi-resource-gitlab/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ package main

import (
"context"

_ "embed"

gitlab "github.com/pulumi/pulumi-gitlab/provider/v6"
"github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge"

gitlab "github.com/pulumi/pulumi-gitlab/provider/v6"
)

//go:embed schema-embed.json
Expand Down
3 changes: 2 additions & 1 deletion provider/cmd/pulumi-tfgen-gitlab/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
package main

import (
gitlab "github.com/pulumi/pulumi-gitlab/provider/v6"
"github.com/pulumi/pulumi-terraform-bridge/pf/tfgen"

gitlab "github.com/pulumi/pulumi-gitlab/provider/v6"
)

func main() {
Expand Down
6 changes: 4 additions & 2 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ import (
// The linter requires unnamed imports to have a doc comment
_ "embed"

"github.com/pulumi/pulumi-gitlab/provider/v6/pkg/version"
gitlabShim "gitlab.com/gitlab-org/terraform-provider-gitlab/shim"

pfbridge "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
tks "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens"
shimv2 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2"
"github.com/pulumi/pulumi/sdk/v3/go/common/tokens"
gitlabShim "gitlab.com/gitlab-org/terraform-provider-gitlab/shim"

"github.com/pulumi/pulumi-gitlab/provider/v6/pkg/version"
)

// all of the GitLab token components used below.
Expand Down
Loading