Skip to content

Commit edb1c67

Browse files
authored
Merge branch 'main' into fix/deleteRepositoryFIle
2 parents 932f19c + e2d8f47 commit edb1c67

406 files changed

Lines changed: 29217 additions & 15841 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
env:
1919
GITHUB_TEST_ORGANIZATION: kfcampbell-terraform-provider
2020
steps:
21-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
22-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
21+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
22+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
2323
with:
2424
go-version-file: go.mod
2525
cache: true
@@ -37,7 +37,7 @@ jobs:
3737
has-tests: ${{ steps.set-matrix.outputs.has-tests }}
3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
40+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
4141

4242
- name: Generate matrix
4343
id: set-matrix
@@ -93,10 +93,10 @@ jobs:
9393

9494
steps:
9595
- name: Checkout
96-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
96+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
9797

9898
- name: Setup Go
99-
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
99+
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
100100
with:
101101
go-version-file: go.mod
102102
cache: true

.github/workflows/codeql.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,26 @@ jobs:
3131

3232
steps:
3333
- name: Checkout repository
34-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
34+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3535

36-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
36+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
3737
if: matrix.language == 'go'
3838
with:
3939
go-version-file: 'go.mod'
4040
cache: true
4141

4242
# Initializes the CodeQL tools for scanning.
4343
- name: Initialize CodeQL
44-
uses: github/codeql-action/init@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
44+
uses: github/codeql-action/init@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4
4545
with:
4646
languages: ${{ matrix.language }}
4747
build-mode: ${{ matrix['build-mode'] }}
4848
queries: ${{ matrix.queries }}
4949

5050
- name: Autobuild
51-
uses: github/codeql-action/autobuild@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
51+
uses: github/codeql-action/autobuild@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4
5252

5353
- name: Perform CodeQL Analysis
54-
uses: github/codeql-action/analyze@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
54+
uses: github/codeql-action/analyze@e12f0178983d466f2f6028f5cc7a6d786fd97f4b # v4.31.4
5555
with:
5656
category: "/language:${{matrix.language}}"

.github/workflows/dotcom-acceptance-tests-all.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2020
with:
2121
ref: ${{ github.event.pull_request.head.ref }}
2222
fetch-depth: 2
23-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
23+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
2424
with:
2525
go-version-file: 'go.mod'
2626
cache: true
@@ -34,11 +34,11 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- name: Checkout
37-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
37+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3838
with:
3939
ref: ${{ github.event.pull_request.head.ref }}
4040
fetch-depth: 2
41-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
41+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
4242
with:
4343
go-version-file: 'go.mod'
4444
cache: true
@@ -67,11 +67,11 @@ jobs:
6767
runs-on: ubuntu-latest
6868
steps:
6969
- name: Checkout
70-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
70+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
7171
with:
7272
ref: ${{ github.event.pull_request.head.ref }}
7373
fetch-depth: 2
74-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
74+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
7575
with:
7676
go-version-file: 'go.mod'
7777
cache: true

.github/workflows/dotcom-acceptance-tests-manual.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
jq -rc .label.name $GITHUB_EVENT_PATH | cut -d/ -f 2
1818
)"
1919
- name: Checkout
20-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2121
with:
2222
ref: ${{ github.event.pull_request.head.sha }}
23-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
23+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
2424
with:
2525
go-version-file: 'go.mod'
2626
cache: true
@@ -49,10 +49,10 @@ jobs:
4949
jq -rc .label.name $GITHUB_EVENT_PATH | cut -d/ -f 2
5050
)"
5151
- name: Checkout
52-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
52+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
5353
with:
5454
ref: ${{ github.event.pull_request.head.sha }}
55-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
55+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
5656
with:
5757
go-version-file: 'go.mod'
5858
cache: true
@@ -86,10 +86,10 @@ jobs:
8686
jq -rc .label.name $GITHUB_EVENT_PATH | cut -d/ -f 2
8787
)"
8888
- name: Checkout
89-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
89+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
9090
with:
9191
ref: ${{ github.event.pull_request.head.sha }}
92-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
92+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
9393
with:
9494
go-version-file: 'go.mod'
9595
cache: true

.github/workflows/dotcom-acceptance-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
14+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
1515
with:
1616
ref: ${{ github.event.pull_request.head.ref }}
1717
fetch-depth: 2
@@ -24,11 +24,11 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
27+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2828
with:
2929
ref: ${{ github.event.pull_request.head.ref }}
3030
fetch-depth: 2
31-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
31+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
3232
with:
3333
go-version-file: 'go.mod'
3434
cache: true
@@ -44,11 +44,11 @@ jobs:
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Checkout
47-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
47+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
4848
with:
4949
ref: ${{ github.event.pull_request.head.ref }}
5050
fetch-depth: 2
51-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
51+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
5252
with:
5353
go-version-file: 'go.mod'
5454
cache: true

.github/workflows/ghes-acceptance-tests-all.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
31+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3232
with:
3333
ref: ${{ github.event.pull_request.head.ref }}
3434
fetch-depth: 2
35-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
35+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
3636
with:
3737
go-version-file: 'go.mod'
3838
cache: true
@@ -47,11 +47,11 @@ jobs:
4747
runs-on: ubuntu-latest
4848
steps:
4949
- name: Checkout
50-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
50+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
5151
with:
5252
ref: ${{ github.event.pull_request.head.ref }}
5353
fetch-depth: 2
54-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
54+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
5555
with:
5656
go-version-file: 'go.mod'
5757
cache: true
@@ -82,11 +82,11 @@ jobs:
8282
runs-on: ubuntu-latest
8383
steps:
8484
- name: Checkout
85-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
85+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
8686
with:
8787
ref: ${{ github.event.pull_request.head.ref }}
8888
fetch-depth: 2
89-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
89+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
9090
with:
9191
go-version-file: 'go.mod'
9292
cache: true

.github/workflows/ghes-acceptance-tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2727
with:
2828
ref: ${{ github.event.pull_request.head.ref }}
2929
fetch-depth: 2
30-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
30+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
3131
with:
3232
go-version-file: 'go.mod'
3333
cache: true
@@ -42,11 +42,11 @@ jobs:
4242
runs-on: ubuntu-latest
4343
steps:
4444
- name: Checkout
45-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
45+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
4646
with:
4747
ref: ${{ github.event.pull_request.head.ref }}
4848
fetch-depth: 2
49-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
49+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
5050
with:
5151
go-version-file: 'go.mod'
5252
cache: true
@@ -63,11 +63,11 @@ jobs:
6363
runs-on: ubuntu-latest
6464
steps:
6565
- name: Checkout
66-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
66+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
6767
with:
6868
ref: ${{ github.event.pull_request.head.ref }}
6969
fetch-depth: 2
70-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
70+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
7171
with:
7272
go-version-file: 'go.mod'
7373
cache: true

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
28+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2929

3030
- name: Setup Go
31-
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
31+
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
3232
with:
3333
go-version-file: go.mod
3434
cache: true
@@ -73,12 +73,12 @@ jobs:
7373
needs: [ pre-release-tests ] # runs only if pre-release tests pass
7474
runs-on: ubuntu-latest
7575
steps:
76-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
76+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
7777
with:
7878
# Allow goreleaser to access older tag information.
7979
fetch-depth: 0
8080

81-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
81+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
8282
with:
8383
go-version-file: 'go.mod'
8484
cache: true

examples/hosted_runner/main.tf

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
resource "github_actions_runner_group" "example" {
2+
name = "example-runner-group"
3+
visibility = "all"
4+
}
5+
6+
# NOTE: You must first query available images using the GitHub API:
7+
# GET /orgs/{org}/actions/hosted-runners/images/github-owned
8+
# The image ID is numeric, not a string like "ubuntu-latest"
9+
resource "github_actions_hosted_runner" "example" {
10+
name = "example-hosted-runner"
11+
12+
image {
13+
id = "2306" # Ubuntu Latest (24.04) - query your org for available IDs
14+
source = "github"
15+
}
16+
17+
size = "4-core"
18+
runner_group_id = github_actions_runner_group.example.id
19+
}
20+
21+
# Advanced example with optional parameters
22+
resource "github_actions_hosted_runner" "advanced" {
23+
name = "advanced-hosted-runner"
24+
25+
image {
26+
id = "2306" # Ubuntu Latest (24.04) - query your org for available IDs
27+
source = "github"
28+
}
29+
30+
size = "8-core"
31+
runner_group_id = github_actions_runner_group.example.id
32+
maximum_runners = 10
33+
enable_static_ip = true
34+
}

github/apps.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import (
88
"fmt"
99
"io"
1010
"net/http"
11+
"net/url"
12+
"path"
1113
"time"
1214

1315
"github.com/go-jose/go-jose/v3"
@@ -16,7 +18,7 @@ import (
1618

1719
// GenerateOAuthTokenFromApp generates a GitHub OAuth access token from a set of valid GitHub App credentials.
1820
// The returned token can be used to interact with both GitHub's REST and GraphQL APIs.
19-
func GenerateOAuthTokenFromApp(baseURL, appID, appInstallationID, pemData string) (string, error) {
21+
func GenerateOAuthTokenFromApp(baseURL *url.URL, appID, appInstallationID, pemData string) (string, error) {
2022
appJWT, err := generateAppJWT(appID, time.Now(), []byte(pemData))
2123
if err != nil {
2224
return "", err
@@ -30,14 +32,15 @@ func GenerateOAuthTokenFromApp(baseURL, appID, appInstallationID, pemData string
3032
return token, nil
3133
}
3234

33-
func getInstallationAccessToken(baseURL, jwt, installationID string) (string, error) {
34-
if baseURL != "https://api.github.com/" && !GHECDataResidencyMatch.MatchString(baseURL) {
35-
baseURL += "api/v3/"
35+
func getInstallationAccessToken(baseURL *url.URL, jwt, installationID string) (string, error) {
36+
hostname := baseURL.Hostname()
37+
if hostname != DotComHost && !GHECDataResidencyHostMatch.MatchString(hostname) {
38+
baseURL.Path = path.Join(baseURL.Path, "api/v3/")
3639
}
3740

38-
url := fmt.Sprintf("%sapp/installations/%s/access_tokens", baseURL, installationID)
41+
baseURL.Path = path.Join(baseURL.Path, "app/installations/", installationID, "access_tokens")
3942

40-
req, err := http.NewRequest(http.MethodPost, url, nil)
43+
req, err := http.NewRequest(http.MethodPost, baseURL.String(), nil)
4144
if err != nil {
4245
return "", err
4346
}

0 commit comments

Comments
 (0)