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

Adding step in setup-go to use GATI Token in pulling private repos #710

Merged
merged 5 commits into from
Nov 21, 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
6 changes: 5 additions & 1 deletion actions/ctf-run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,17 @@ inputs:
required: false
description: Do not use a go cache
default: "false"
gati_token:
required: false
description: Token provided by GATI to pull from private repos

runs:
using: composite
steps:
# Setup Tools and libraries
- name: Setup environment
if: inputs.run_setup == 'true'
uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@49cb1613e96c9ce17f7290e4dabd38f43aa9bd4d # [email protected]
uses: smartcontractkit/.github/actions/ctf-setup-run-tests-environment@2c41e20994aa9c0ae1af1ab467c64ac4acb15f2d # [email protected]
with:
test_download_vendor_packages_command:
${{ inputs.test_download_vendor_packages_command }}
Expand All @@ -186,6 +189,7 @@ runs:
QA_KUBECONFIG: ${{ inputs.QA_KUBECONFIG }}
should_tidy: ${{ inputs.should_tidy }}
no_cache: ${{ inputs.no_cache }}
gati_token: ${{ inputs.gati_token }}

- name: Replace chainlink/integration-tests deps
if: ${{ inputs.dep_chainlink_integration_tests }}
Expand Down
10 changes: 10 additions & 0 deletions actions/ctf-setup-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ inputs:
test_download_vendor_packages_command:
required: false
description: The command to download the go modules
gati_token:
required: false
description: GATI token used to pull private repos

runs:
using: composite
Expand All @@ -45,6 +48,13 @@ runs:
check-latest: true
cache: false

- name: Setup Go with private repo access
shell: bash
if: ${{ inputs.gati_token != '' }}
run: |
git config --global url."https://x-access-token:${{ inputs.gati_token }}@github.com/".insteadOf "https://github.com/"
go env -w GOPRIVATE=github.com/smartcontractkit/*

- name: Set go cache keys
shell: bash
id: go-cache-dir
Expand Down
6 changes: 5 additions & 1 deletion actions/ctf-setup-run-tests-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ inputs:
required: false
description: Do not use a go cache
default: "false"
gati_token:
required: false
description: Token provided by GATI to pull from private repos

runs:
using: composite
steps:
# Go setup and caching
- name: Setup Go
if: inputs.go_necessary == 'true'
uses: smartcontractkit/.github/actions/ctf-setup-go@b0d756c57fcdbcff187e74166562a029fdd5d1b9 # [email protected]
uses: smartcontractkit/.github/actions/ctf-setup-go@5a90069d860edbaddc296a139b13e2e97bf463ab # [email protected]
with:
go_version: ${{ inputs.go_version }}
go_mod_path: ${{ inputs.go_mod_path }}
Expand All @@ -78,6 +81,7 @@ runs:
no_cache: ${{ inputs.no_cache }}
test_download_vendor_packages_command:
${{ inputs.test_download_vendor_packages_command }}
gati_token: ${{ inputs.gati_token }}

# Setup AWS cred and K8s context
- name: Configure AWS Credentials
Expand Down
Loading