Skip to content

Commit

Permalink
Adding step in setup-go to use GATI Token in pulling private repos (#710
Browse files Browse the repository at this point in the history
)

* Adding if gati token active to use it to pull private go repos

* Adding setup-run-test-environment bump and gati token

* ctf-run-tests bump and gati token

* prettier changes
  • Loading branch information
chray-zhang authored Nov 21, 2024
1 parent 29eb28c commit 815a3a6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
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

0 comments on commit 815a3a6

Please sign in to comment.