on: workflow_call: inputs: runs-on: required: true type: string jobs: setup-go-cache: runs-on: ${{ fromJSON(inputs.runs-on) }} steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - id: setup-go name: Setup go uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 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 )