From d468af8104a8fac439de8f14bdffb34e36b0c23a Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 18 Jul 2023 19:18:38 +0200 Subject: [PATCH] fix cache naming --- .github/workflows/test-backend.yml | 12 ++++++------ .github/workflows/test-e2e.yml | 6 +++--- .github/workflows/test-webapp.yml | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 9fd6adb49..fa43c9b81 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -40,7 +40,7 @@ jobs: uses: actions/cache/save@v3.3.1 with: path: /tmp/neo4j.tar - key: backend-neo4j-cache-${{github.run_id}} + key: ${{ github.run_id }}-backend-neo4j-cache build_test_backend: name: Docker Build Test - Backend @@ -61,7 +61,7 @@ jobs: uses: actions/cache/save@v3.3.1 with: path: /tmp/backend.tar - key: backend-cache-${{github.run_id}} + key: ${{ github.run_id }}-backend-cache lint_backend: name: Lint Backend @@ -90,14 +90,14 @@ jobs: uses: actions/cache/restore@v3.3.1 with: path: /tmp/neo4j.tar - key: backend-neo4j-cache-${{github.run_id}} + key: ${{ github.run_id }}-backend-neo4j-cache fail-on-cache-miss: true - name: Restore Backend cache uses: actions/cache/restore@v3.3.1 with: path: /tmp/backend.tar - key: backend-cache-${{github.run_id}} + key: ${{ github.run_id }}backend-cache fail-on-cache-miss: true - name: Load Docker Images @@ -134,7 +134,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh extension install actions/gh-actions-cache - KEY="backend-neo4j-cache-$(($GITHUB_RUN_NUMBER))" + KEY="${{ github.run_id }}-backend-neo4j-cache" gh actions-cache delete $KEY -R Ocelot-Social-Community/Ocelot-Social --confirm - KEY="backend-cache-$(($GITHUB_RUN_NUMBER))" + KEY="${{ github.run_id }}-backend-cache" gh actions-cache delete $KEY -R Ocelot-Social-Community/Ocelot-Social --confirm diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 4d25ef5fe..921fb4fc8 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -42,7 +42,7 @@ jobs: /home/runner/.cache/Cypress /home/runner/work/Ocelot-Social/Ocelot-Social /tmp/images/ - key: e2e-preparation-cache-${{github.run_id}} + key: ${{ github.run_id }}-e2e-preparation-cache fullstack_tests: name: Fullstack tests @@ -65,7 +65,7 @@ jobs: /home/runner/.cache/Cypress /home/runner/work/Ocelot-Social/Ocelot-Social /tmp/images/ - key: e2e-preparation-cache-${{github.run_id}} + key: ${{ github.run_id }}e2e-preparation-cache fail-on-cache-miss: true - name: Boot up test system | docker-compose @@ -108,5 +108,5 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh extension install actions/gh-actions-cache - KEY="e2e-preparation-cache-$(($GITHUB_RUN_NUMBER))" + KEY="${{ github.run_id }}-e2e-preparation-cache" gh actions-cache delete $KEY -R Ocelot-Social-Community/Ocelot-Social --confirm \ No newline at end of file diff --git a/.github/workflows/test-webapp.yml b/.github/workflows/test-webapp.yml index 5c6cce0f6..0f578dc46 100644 --- a/.github/workflows/test-webapp.yml +++ b/.github/workflows/test-webapp.yml @@ -53,7 +53,7 @@ jobs: uses: actions/cache/save@v3.3.1 with: path: /tmp/webapp.tar - key: "webapp-cache-${{ github.run_id }}" + key: ${{ github.run_id }}-webapp-cache lint_webapp: name: Lint Webapp @@ -82,7 +82,7 @@ jobs: uses: actions/cache/restore@v3.3.1 with: path: /tmp/webapp.tar - key: "webapp-cache-${{ github.run_id }}" + key: ${{ github.run_id }}-webapp-cache - name: Load Docker Image run: docker load < /tmp/webapp.tar @@ -110,6 +110,6 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh extension install actions/gh-actions-cache - KEY="webapp-cache-$(($GITHUB_RUN_NUMBER))" + KEY="${{ github.run_id }}-webapp-cache" gh actions-cache delete $KEY -R Ocelot-Social-Community/Ocelot-Social --confirm