Skip to content

Commit

Permalink
chore: fix cache keys
Browse files Browse the repository at this point in the history
🤦
  • Loading branch information
alecthomas committed Feb 9, 2024
1 parent 3628357 commit 7c5968b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/actions/build-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ runs:
uses: actions/cache/restore@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-{{ hashFiles('**/go.sum') }}-go
key: ${{ runner.os }}-${{ hashFiles('**/go.sum') }}-go
- name: Restore Maven Modules Cache
id: cache-maven
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-{{ hashFiles('**/pom.xml') }}-maven
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}-maven

15 changes: 13 additions & 2 deletions .github/workflows/writecache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ on:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-writecache
cancel-in-progress: true
name: Write Cache
jobs:
write-cache:
Expand All @@ -14,6 +17,14 @@ jobs:
uses: cashapp/activate-hermit@v1
- name: Build Cache
uses: ./.github/actions/build-cache
- name: Docker Compose
run: docker compose up -d --wait
- name: Init DB
run: ftl-initdb
- name: Clean All
run: bit -c
- name: Rebuild All
run: bit
- name: Download Maven Dependencies
run: mvn dependency:resolve --batch-mode
- name: Download Go Dependencies
Expand All @@ -23,10 +34,10 @@ jobs:
uses: actions/cache/save@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-{{ hashFiles('**/go.sum') }}-go
key: ${{ runner.os }}-${{ hashFiles('**/go.sum') }}-go
- name: Save Maven Modules Cache
id: cache-maven
uses: actions/cache/save@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-{{ hashFiles('**/pom.xml') }}-maven
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}-maven

0 comments on commit 7c5968b

Please sign in to comment.