From 7c5968b734a4b5690cbc717c6dacf2d0ebbc4b7a Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Fri, 9 Feb 2024 19:48:59 +1100 Subject: [PATCH] chore: fix cache keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤦 --- .github/actions/build-cache/action.yml | 4 ++-- .github/workflows/writecache.yml | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-cache/action.yml b/.github/actions/build-cache/action.yml index 307c2e91c0..9a7f2560e4 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 }}-${{ 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 diff --git a/.github/workflows/writecache.yml b/.github/workflows/writecache.yml index 86b100a720..504fee3c4c 100644 --- a/.github/workflows/writecache.yml +++ b/.github/workflows/writecache.yml @@ -2,6 +2,9 @@ on: push: branches: - main +concurrency: + group: ${{ github.ref }}-writecache + cancel-in-progress: true name: Write Cache jobs: write-cache: @@ -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 @@ -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