Skip to content

Commit c23b925

Browse files
committed
aaa
Signed-off-by: Steve Hipwell <[email protected]>
1 parent a5dc46e commit c23b925

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ jobs:
3737
- name: Checkout
3838
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3939

40-
- name: Check secrets
41-
env:
42-
INPUT_ALLOWED_SECRETS: ${{ vars.DOTCOM_ACCEPTANCE_TESTS_ALLOWED_SECRETS || 'DOTCOM_TEST_USER_TOKEN' }}
43-
INPUT_SECRETS: ${{ toJSON(secrets) }}
44-
run: |
45-
set -eou pipefail
40+
# - name: Check secrets
41+
# env:
42+
# INPUT_ALLOWED_SECRETS: ${{ vars.DOTCOM_ACCEPTANCE_TESTS_ALLOWED_SECRETS || 'DOTCOM_TEST_USER_TOKEN' }}
43+
# INPUT_SECRETS: ${{ toJSON(secrets) }}
44+
# run: |
45+
# set -eou pipefail
4646

47-
secret_keys="$(jq --raw-output --compact-output '[. | keys[] | select(test("^(?:(?:TEST)|(?:test))_") | not)] | sort | join(",")' <<<"${INPUT_SECRETS}")"
48-
if [[ "${secret_keys}" != "${INPUT_ALLOWED_SECRETS}" ]]; then
49-
echo "::error::Too many or too few secrets configured: ${secret_keys}"
50-
exit 1
51-
fi
47+
# secret_keys="$(jq --raw-output --compact-output '[. | keys[] | select(test("^(?:(?:ACTIONS)|(?:actions)|(?:GITHUB)|(?:github)|(?:TEST)|(?:test))_") | not)] | sort | join(",")' <<<"${INPUT_SECRETS}")"
48+
# if [[ "${secret_keys}" != "${INPUT_ALLOWED_SECRETS}" ]]; then
49+
# echo "::error::Too many or too few secrets configured: ${secret_keys}"
50+
# exit 1
51+
# fi
5252

5353
- name: Check credentials
5454
id: credentials
@@ -75,6 +75,7 @@ jobs:
7575
env:
7676
TF_ACC: "1"
7777
TF_LOG: INFO
78+
GITHUB_TOKEN: ${{ steps.credentials.outputs.token }}
7879
GITHUB_BASE_URL: https://api.github.com/
7980
GITHUB_TEST_TYPE: ${{ matrix.mode }}
8081
GITHUB_OWNER: ${{ (matrix.mode == 'individual' && 'github-terraform-test-user') || (matrix.mode == 'organization' && 'terraformtesting') || '' }}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: |
3737
set -eou pipefail
3838
39-
secret_keys="$(jq --raw-output --compact-output '[. | keys[] | select(test("^(?:(?:TEST)|(?:test))_") | not)] | sort | join(",")' <<<"${INPUT_SECRETS}")"
39+
secret_keys="$(jq --raw-output --compact-output '[. | keys[] | select(test("^(?:(?:ACTIONS)|(?:actions)|(?:GITHUB)|(?:github)|(?:TEST)|(?:test))_") | not)] | sort | join(",")' <<<"${INPUT_SECRETS}")"
4040
if [[ "${secret_keys}" != "${INPUT_ALLOWED_SECRETS}" ]]; then
4141
echo "::error::Too many or too few secrets configured: ${secret_keys}"
4242
exit 1
@@ -89,6 +89,7 @@ jobs:
8989
env:
9090
TF_ACC: "1"
9191
TF_LOG: INFO
92+
GITHUB_TOKEN: ${{ steps.credentials.outputs.token }}
9293
GITHUB_BASE_URL: ${{ steps.server.outputs.address }}
9394
GITHUB_TEST_TYPE: enterprise
9495
GITHUB_OWNER: terraformtesting

github/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package github
22

33
import (
44
"context"
5+
"fmt"
56
"net/http"
67
"net/url"
78
"path"
@@ -103,7 +104,7 @@ func (c *Config) NewRESTClient(client *http.Client) (*github.Client, error) {
103104

104105
hostname := uv3.Hostname()
105106
if hostname != DotComHost && !GHECDataResidencyHostMatch.MatchString(hostname) {
106-
uv3.Path = path.Join(uv3.Path, "api/v3/")
107+
uv3.Path = fmt.Sprintf("%s/", path.Join(uv3.Path, "api/v3"))
107108
}
108109

109110
v3client, err := github.NewClient(client).WithEnterpriseURLs(uv3.String(), "")

0 commit comments

Comments
 (0)