34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
on:
|
|
workflow_call:
|
|
inputs:
|
|
runs-on:
|
|
required: true
|
|
type: string
|
|
jobs:
|
|
setup-go-cache:
|
|
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
|
steps:
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0 as of 2023-01-18
|
|
- id: setup-go
|
|
name: Setup go
|
|
uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 #v3.4.0 as of 2022-12-07
|
|
with:
|
|
go-version-file: ./.go-version
|
|
cache: true
|
|
- id: setup-git
|
|
name: Setup Git configuration
|
|
run: |
|
|
git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}@github.com".insteadOf https://github.com
|
|
- id: download-modules
|
|
name: Download go modules
|
|
run: |
|
|
# go list ./... forces downloading some additional versions of modules that 'go mod
|
|
# download' misses. We need this because we make use of go list itself during
|
|
# code generation in later builds that rely on this module cache.
|
|
go list ./...
|
|
go list -test ./...
|
|
|
|
go mod download
|
|
( cd sdk && go mod download )
|
|
( cd api && go mod download )
|