Skip to content

Commit

Permalink
Fix verify test packages GOPRIVATE (#21318)
Browse files Browse the repository at this point in the history
  • Loading branch information
miagilepner authored Jun 16, 2023
1 parent 9290d5f commit 30aac44
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/scripts/generate-test-package-lists.sh
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ test_packages[15]+=" $base/physical/mysql"
test_packages[15]+=" $base/plugins/database/cassandra"
if [ "${ENTERPRISE:+x}" == "x" ] ; then
test_packages[15]+=" $base/vault/external_tests/namespaces"
test_packages[15]+=" $base/vault/external_tests/census"
fi
test_packages[15]+=" $base/vault/external_tests/sealmigrationext"

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,43 @@ jobs:
test-generate-test-package-list:
runs-on: ${{ fromJSON(inputs.runs-on) }}
name: Verify Test Package Distribution
permissions:
id-token: write # Note: this permission is explicitly required for Vault auth
contents: read
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version-file: ./.go-version
cache: true
- name: Authenticate to Vault
id: vault-auth
if: github.repository == 'hashicorp/vault-enterprise'
run: vault-auth
- name: Fetch Secrets
id: secrets
if: github.repository == 'hashicorp/vault-enterprise'
uses: hashicorp/vault-action@130d1f5f4fe645bb6c83e4225c04d64cfb62de6e
with:
url: ${{ steps.vault-auth.outputs.addr }}
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
token: ${{ steps.vault-auth.outputs.token }}
secrets: |
kv/data/github/${{ github.repository }}/github-token username-and-token | github-token;
- id: setup-git-private
name: Setup Git configuration (private)
if: github.repository == 'hashicorp/vault-enterprise'
run: |
git config --global url."https://${{ steps.secrets.outputs.github-token }}@github.com".insteadOf https://github.com
- id: setup-git-public
name: Setup Git configuration (public)
if: github.repository != 'hashicorp/vault-enterprise'
run: |
git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN}}@github.com".insteadOf https://github.com
- id: test
working-directory: .github/scripts
env:
GOPRIVATE: github.com/hashicorp/*
run: |
ENTERPRISE=${{ inputs.enterprise }} ./test-generate-test-package-lists.sh
runner-indexes:
Expand Down

0 comments on commit 30aac44

Please sign in to comment.