Skip to content

Commit 3e84a48

Browse files
committed
update
1 parent fa21fda commit 3e84a48

File tree

12 files changed

+101
-217
lines changed

12 files changed

+101
-217
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,27 @@ jobs:
1616
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
1717
id: token
1818
with:
19-
app-id: ${{ vars.GH_APP_TAGPR_ID }}
19+
app-id: ${{ secrets.GH_APP_TAGPR_ID }}
2020
private-key: ${{ secrets.GH_APP_TAGPR_PKEY }}
2121

2222
- name: Checkout
23-
uses: actions/checkout@v5
23+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2424

2525
- name: Set up Go
26-
uses: actions/setup-go@v5
26+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
2727
with:
2828
go-version-file: 'go.mod'
2929
cache: true
3030

3131
- name: Import GPG key
32-
uses: crazy-max/ghaction-import-gpg@v6
32+
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
3333
id: import_gpg
3434
with:
3535
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
3636
passphrase: ${{ secrets.GPG_PASSPHRASE }}
3737

3838
- name: Run GoReleaser
39-
uses: goreleaser/goreleaser-action@v6
39+
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
4040
with:
4141
version: latest
4242
args: release --clean

.github/workflows/tagpr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ jobs:
2222
private-key: ${{ secrets.GH_APP_TAGPR_PKEY }}
2323

2424
- name: Checkout
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2626
with:
2727
token: ${{ steps.token.outputs.token }}
2828

2929
- name: Set up Go
30-
uses: actions/setup-go@v5
30+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
3131
with:
3232
go-version-file: 'go.mod'
3333
cache: true
3434

3535
- name: Run tagpr
36-
uses: Songmu/tagpr@v1
36+
uses: Songmu/tagpr@9c294c8b7b1815a5f3b7c61d6ee6aa50ac25b030 # v1.8.4
3737
env:
3838
GITHUB_TOKEN: ${{ steps.token.outputs.token }}

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
2020

2121
- name: Set up Go
22-
uses: actions/setup-go@v5
22+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2323
with:
2424
go-version-file: 'go.mod'
2525
cache: true
@@ -45,10 +45,10 @@ jobs:
4545
if: github.event_name == 'pull_request'
4646
steps:
4747
- name: Checkout
48-
uses: actions/checkout@v4
48+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
4949

5050
- name: Set up Go
51-
uses: actions/setup-go@v5
51+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
5252
with:
5353
go-version-file: 'go.mod'
5454
cache: true

.goreleaser.yml

Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,61 @@
1+
# Visit https://goreleaser.com for documentation on how to customize this
2+
# behavior.
3+
version: 2
4+
before:
5+
hooks:
6+
# this is just an example and not a requirement for provider building/publishing
7+
- go mod tidy
18
builds:
2-
- env:
3-
- CGO_ENABLED=0
4-
mod_timestamp: '{{ .CommitTimestamp }}'
5-
flags:
6-
- -trimpath
7-
ldflags:
8-
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
9-
goos:
10-
- freebsd
11-
- windows
12-
- linux
13-
- darwin
14-
goarch:
15-
- amd64
16-
- '386'
17-
- arm
18-
- arm64
19-
ignore:
20-
- goos: darwin
21-
goarch: '386'
22-
main: ./cmd/terraform-provider-kwgithub
23-
binary: '{{ .ProjectName }}_v{{ .Version }}'
9+
- env:
10+
# goreleaser does not work with CGO, it could also complicate
11+
# usage by users in CI/CD systems like HCP Terraform where
12+
# they are unable to install libraries.
13+
- CGO_ENABLED=0
14+
mod_timestamp: '{{ .CommitTimestamp }}'
15+
flags:
16+
- -trimpath
17+
ldflags:
18+
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
19+
goos:
20+
- freebsd
21+
- windows
22+
- linux
23+
- darwin
24+
goarch:
25+
- amd64
26+
- '386'
27+
- arm
28+
- arm64
29+
ignore:
30+
- goos: darwin
31+
goarch: '386'
32+
binary: '{{ .ProjectName }}_v{{ .Version }}'
2433
archives:
25-
- format: zip
26-
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
34+
- format: zip
35+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
2736
checksum:
37+
extra_files:
38+
- glob: 'terraform-registry-manifest.json'
39+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
2840
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
2941
algorithm: sha256
3042
signs:
3143
- artifacts: checksum
3244
args:
45+
# if you are using this in a GitHub action or some other automated pipeline, you
46+
# need to pass the batch flag to indicate its not interactive.
3347
- "--batch"
3448
- "--local-user"
35-
- "{{ .Env.GPG_FINGERPRINT }}"
49+
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
3650
- "--output"
3751
- "${signature}"
3852
- "--detach-sign"
3953
- "${artifact}"
4054
release:
55+
extra_files:
56+
- glob: 'terraform-registry-manifest.json'
57+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
58+
# If you want to manually examine the release before its live, uncomment this line:
59+
# draft: true
4160
changelog:
42-
sort: asc
43-
filters:
44-
exclude:
45-
- '^docs:'
46-
- '^test:'
61+
disable: true

cmd/terraform-provider-kwgithub/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66

77
"github.com/hashicorp/terraform-plugin-framework/providerserver"
8-
"github.com/knowledge-work/knowledgework/terraform-provider/github-repository-rule/internal/provider"
8+
"github.com/knowledge-work/terraform-provider-kw-github/internal/provider"
99
)
1010

1111
func main() {

go.mod

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,33 @@
1-
module github.com/knowledge-work/knowledgework/terraform-provider/github-repository-rule
1+
module github.com/knowledge-work/terraform-provider-kw-github
22

33
go 1.23.0
44

5-
replace github.com/knowledge-work/knowledgework/terraform-provider/github-repository-rule => ./
6-
75
require (
86
github.com/google/go-github/v74 v74.0.0
97
github.com/hashicorp/terraform-plugin-framework v1.15.1
108
github.com/hashicorp/terraform-plugin-go v0.28.0
11-
github.com/hashicorp/terraform-plugin-testing v1.13.3
129
)
1310

1411
require (
15-
github.com/ProtonMail/go-crypto v1.1.6 // indirect
16-
github.com/agext/levenshtein v1.2.2 // indirect
17-
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
18-
github.com/cloudflare/circl v1.6.1 // indirect
1912
github.com/fatih/color v1.16.0 // indirect
2013
github.com/golang/protobuf v1.5.4 // indirect
21-
github.com/google/go-cmp v0.7.0 // indirect
2214
github.com/google/go-querystring v1.1.0 // indirect
23-
github.com/hashicorp/errwrap v1.0.0 // indirect
24-
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
25-
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
26-
github.com/hashicorp/go-cty v1.5.0 // indirect
2715
github.com/hashicorp/go-hclog v1.6.3 // indirect
28-
github.com/hashicorp/go-multierror v1.1.1 // indirect
2916
github.com/hashicorp/go-plugin v1.6.3 // indirect
30-
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
3117
github.com/hashicorp/go-uuid v1.0.3 // indirect
32-
github.com/hashicorp/go-version v1.7.0 // indirect
33-
github.com/hashicorp/hc-install v0.9.2 // indirect
34-
github.com/hashicorp/hcl/v2 v2.23.0 // indirect
35-
github.com/hashicorp/logutils v1.0.0 // indirect
36-
github.com/hashicorp/terraform-exec v0.23.0 // indirect
37-
github.com/hashicorp/terraform-json v0.25.0 // indirect
3818
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
39-
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0 // indirect
4019
github.com/hashicorp/terraform-registry-address v0.2.5 // indirect
4120
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
4221
github.com/hashicorp/yamux v0.1.1 // indirect
4322
github.com/mattn/go-colorable v0.1.13 // indirect
4423
github.com/mattn/go-isatty v0.0.20 // indirect
45-
github.com/mitchellh/copystructure v1.2.0 // indirect
4624
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
47-
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
48-
github.com/mitchellh/mapstructure v1.5.0 // indirect
49-
github.com/mitchellh/reflectwalk v1.0.2 // indirect
5025
github.com/oklog/run v1.0.0 // indirect
51-
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
5226
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
5327
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
54-
github.com/zclconf/go-cty v1.16.3 // indirect
55-
golang.org/x/crypto v0.39.0 // indirect
56-
golang.org/x/mod v0.25.0 // indirect
5728
golang.org/x/net v0.40.0 // indirect
58-
golang.org/x/sync v0.15.0 // indirect
5929
golang.org/x/sys v0.33.0 // indirect
6030
golang.org/x/text v0.26.0 // indirect
61-
golang.org/x/tools v0.33.0 // indirect
62-
google.golang.org/appengine v1.6.8 // indirect
6331
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
6432
google.golang.org/grpc v1.72.1 // indirect
6533
google.golang.org/protobuf v1.36.6 // indirect

0 commit comments

Comments
 (0)