Skip to content

Commit

Permalink
chore: caching fixes
Browse files Browse the repository at this point in the history
- Don't create docker cache on PR
- Change the way maven write caching works
  • Loading branch information
stuartwdouglas committed Oct 9, 2024
1 parent f4fab8c commit 8fc8e6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/build-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ runs:
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.yml') }}
read-only: true
- name: Restore Go Modules Cache
id: cache-go-modules
uses: actions/cache/restore@v4
Expand All @@ -28,7 +29,6 @@ runs:
with:
path: |
~/.m2/repository
**SNAPSHOT**
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/writecache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
~/go/pkg/mod
${{ steps.find-go-build-cache.outputs.cache }}
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Delete Maven Snapshots
id: maven-delete-snapshots
run: |
find ~/.m2/repository -type d -name "*SNAPSHOT" -exec rm -rf {} +
- name: Save Maven Modules Cache
id: cache-maven
uses: actions/cache/save@v4
Expand All @@ -49,3 +53,7 @@ jobs:
~/.pnpm-store
node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Save Docker Images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.yml') }}

0 comments on commit 8fc8e6c

Please sign in to comment.