Skip to content

Commit

Permalink
try to improve cache
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Wiesinger <[email protected]>
  • Loading branch information
mowies committed Aug 29, 2024
1 parent bf44205 commit 0cfa86f
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,32 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: "~1.22.6"
cache: false
- uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- uses: docker/setup-buildx-action@v3
- uses: anchore/sbom-action/[email protected]
- run: make generate
- name: Cache
- name: Cache tools
uses: actions/cache@v4
id: cache-tools
with:
path: |
.tools
~/.cache/go-build
~/go/pkg/mod
key: snapshot-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum', 'build/go.sum') }}
- name: Touch tools
path: .tools
key: snapshot-tools-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum') }}
- name: Install tools
if: steps.cache-tools.outputs.cache-hit != 'true'
run: |
mkdir -p .tools
touch .tools/*
make install-tools
- name: Generate source files
run: make generate
- name: Cache go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: snapshot-mods-${{ runner.os }}-${{ hashFiles('build/go.sum') }}
- name: Create Snapshot for Pull Request
run: make snapshot
- name: Upload Pull Request Preview
Expand Down

0 comments on commit 0cfa86f

Please sign in to comment.