Skip to content

Commit

Permalink
chore: tweak caching
Browse files Browse the repository at this point in the history
Don't use hash of pom.xml or go.sum, instead just rebuild the cache
every time a commit hits main.
  • Loading branch information
alecthomas committed Feb 14, 2024
1 parent 2c5f3fe commit de15203
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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 }}-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 }}-maven

6 changes: 2 additions & 4 deletions .github/workflows/writecache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
uses: actions/checkout@v4
- name: Init Hermit
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
Expand All @@ -34,10 +32,10 @@ jobs:
uses: actions/cache/save@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-${{ hashFiles('**/go.sum') }}-go
key: ${{ runner.os }}-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 }}-maven

0 comments on commit de15203

Please sign in to comment.