Skip to content

Commit

Permalink
fix: cicd 캐시 관련 내용 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
redundant4u committed Dec 16, 2022
1 parent 7b3c65a commit 265355e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/deploy_server_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}"
17 changes: 9 additions & 8 deletions .github/workflows/deploy_server_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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 }}"

0 comments on commit 265355e

Please sign in to comment.