From de1520356e504b8f66a040e8a3d4f3710f41f8cd Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Wed, 14 Feb 2024 19:56:07 +1100 Subject: [PATCH] chore: tweak caching Don't use hash of pom.xml or go.sum, instead just rebuild the cache every time a commit hits main. --- .github/actions/build-cache/action.yml | 4 ++-- .github/workflows/writecache.yml | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/actions/build-cache/action.yml b/.github/actions/build-cache/action.yml index 9a7f2560e4..3f78be6ad0 100644 --- a/.github/actions/build-cache/action.yml +++ b/.github/actions/build-cache/action.yml @@ -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 diff --git a/.github/workflows/writecache.yml b/.github/workflows/writecache.yml index 504fee3c4c..92c5d4743e 100644 --- a/.github/workflows/writecache.yml +++ b/.github/workflows/writecache.yml @@ -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 @@ -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