From 265355efc9b1b42090c17dc48c1ff2c5901a66b2 Mon Sep 17 00:00:00 2001 From: redundant4u Date: Fri, 16 Dec 2022 16:42:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20cicd=20=EC=BA=90=EC=8B=9C=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EB=82=B4=EC=9A=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_server_dev.yml | 10 +++++++++- .github/workflows/deploy_server_prod.yml | 17 +++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy_server_dev.yml b/.github/workflows/deploy_server_dev.yml index 275efb31..76c396a7 100644 --- a/.github/workflows/deploy_server_dev.yml +++ b/.github/workflows/deploy_server_dev.yml @@ -49,7 +49,7 @@ jobs: RESULT=$(curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ - '${{ secrets.CACHE_PATH }}') + "${{ secrets.CACHE_PATH }}-1") if [[ $RESULT == *"created_at"* ]] then @@ -152,3 +152,11 @@ jobs: status: ${{ job.status }} author_name: Keeper Devlopment Backend CICD fields: repo, commit, message, author, job, took + + - name: Delete Previous Gradle Cache + run: | + curl \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + "${{ secrets.CACHE_PATH }}-${{ steps.cache.outputs.old }}" diff --git a/.github/workflows/deploy_server_prod.yml b/.github/workflows/deploy_server_prod.yml index 0ff96c3e..99d95500 100644 --- a/.github/workflows/deploy_server_prod.yml +++ b/.github/workflows/deploy_server_prod.yml @@ -49,7 +49,7 @@ jobs: RESULT=$(curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ - 'https://api.github.com/repos/redundant4u/git-test/actions/caches?key=Linux-gradle-1') + "${{ secrets.CACHE_PATH }}-1") if [[ $RESULT == *"created_at"* ]] then @@ -67,13 +67,6 @@ jobs: path: ~/db-docker-image key: db-docker-image-${{ runner.os }} - - name: Cache DB Docker Image - id: db-docker-image - uses: actions/cache@v3 - with: - path: ~/db-docker-image - key: db-docker-image-${{ runner.os }} - - name: Cache Gradle uses: actions/cache@v3 with: @@ -159,3 +152,11 @@ jobs: status: ${{ job.status }} author_name: Keeper Production Backend CICD fields: repo, commit, message, author, job, took + + - name: Delete Previous Gradle Cache + run: | + curl \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + "${{ secrets.CACHE_PATH }}-${{ steps.cache.outputs.old }}"