Skip to content

Commit

Permalink
fix: setup go caching (#15062)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikburt authored Nov 1, 2024
1 parent 5050b79 commit 0a4b5ac
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
7 changes: 4 additions & 3 deletions .github/actions/goreleaser-build-sign-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ runs:
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- name: Setup docker buildx
uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0
- name: Setup go
uses: actions/setup-go@v5.0.2
- name: Set up Go
uses: ./.github/actions/setup-go
with:
go-version-file: "go.mod"
go-version-file: 'go.mod'
only-modules: 'true'
- name: Setup goreleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/setup-go/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ runs:
- uses: actions/cache/[email protected]
name: Cache Go Build Outputs (restore)
# For certain events, we don't necessarily want to create a build cache, but we will benefit from restoring from one.
if: ${{ inputs.only-modules == 'false' && github.event == 'merge_queue' }}
if: ${{ inputs.only-modules == 'false' && github.event == 'merge_group' }}
with:
path: |
${{ steps.go-cache-dir.outputs.gobuildcache }}
Expand All @@ -94,7 +94,7 @@ runs:
- uses: actions/[email protected]
# don't save cache on merge queue events, only restore
if: ${{ inputs.only-modules == 'false' && github.event != 'merge_queue' }}
if: ${{ inputs.only-modules == 'false' && github.event != 'merge_group' }}
name: Cache Go Build Outputs
with:
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/crib-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ jobs:
product-image: ${{ secrets.AWS_SDLC_ECR_HOSTNAME }}/chainlink
product-image-tag: develop
- uses: actions/[email protected]
- name: Setup go
uses: actions/setup-go@v5.0.2
- name: Set up Go
uses: ./.github/actions/setup-go
with:
go-version-file: "go.mod"
go-version-file: 'go.mod'
- name: Run CRIB integration test
working-directory: integration-tests/crib
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
runs-on: ubuntu-latest
needs: [changes]
steps:
- name: Check out code
- name: Checkout repository
uses: actions/[email protected]

- name: Set up Go
if: needs.changes.outputs.src == 'true'
uses: actions/setup-go@v5.0.2
uses: ./.github/actions/setup-go
with:
go-version-file: 'go.mod'
id: go
only-modules: 'true'

- name: Write Go Modules list
if: needs.changes.outputs.src == 'true'
Expand Down

0 comments on commit 0a4b5ac

Please sign in to comment.