Build change for when go caching should be used (#27209)

* Build change for when go caching should be used

This commit does the following:
* Updates all `setup-go` actions to use v4 (which has caching enabled by default)
* For `shared-workflow` jobs caching is left enabled due to the presumed small size
* For `teleport` jobs caching is now disabled due to the size exceeding the cache limit

This should make all of the mentioned jobs a little faster.

* Update build-api.yaml to re-enable caching
This commit is contained in:
Mike Jensen 2023-06-02 09:42:56 -06:00 committed by GitHub
parent 04774100cc
commit bab1a5d54b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 9 deletions

View file

@ -41,7 +41,7 @@ jobs:
path: .github/shared-workflows
ref: main
- name: Installing Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: .github/shared-workflows/bot/go.mod
# Run "check" subcommand on bot.

View file

@ -38,7 +38,7 @@ jobs:
path: .github/shared-workflows
ref: main
- name: Installing Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: .github/shared-workflows/bot/go.mod
# Run "check" subcommand on bot.

View file

@ -33,10 +33,11 @@ jobs:
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
# use the version declared in API's go.mod
go-version-file: api/go.mod
cache-dependency-path: api/go.sum
- name: Init workspace
run: go work init . ./api/

View file

@ -52,8 +52,9 @@ jobs:
corepack enable yarn
- name: Install Go Toolchain
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
cache: false
go-version: ${{ env.GOLANG_VERSION }}
- name: Configure Rust Toolchain

View file

@ -33,8 +33,9 @@ jobs:
run: echo "go-version=$(make --no-print-directory print-go-version | tr -d '\n')" >> $GITHUB_OUTPUT
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
cache: false
go-version: ${{ steps.go-version.outputs.go-version }}
- name: Build

View file

@ -49,7 +49,7 @@ jobs:
path: .github/shared-workflows
ref: main
- name: Installing Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: .github/shared-workflows/bot/go.mod
# Run "check" subcommand on bot.

View file

@ -29,7 +29,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
cache-dependency-path: '**/go.sum'
cache: false
if: ${{ matrix.language == 'go' }}
- name: Initialize the CodeQL tools for scanning

View file

@ -45,7 +45,7 @@ jobs:
path: .github/shared-workflows
ref: main
- name: Installing Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: .github/shared-workflows/bot/go.mod
# Run "dismiss" subcommand on bot.

View file

@ -41,7 +41,7 @@ jobs:
path: .github/shared-workflows
ref: main
- name: Installing Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: .github/shared-workflows/bot/go.mod
# Run "check" subcommand on bot.