Skip to content

Commit a576c55

Browse files
committed
Merge branch 'develop' of https://github.com/yourssu/Yourssu-Scouter-Backend into develop
2 parents f1d1bbf + 9a844a2 commit a576c55

2 files changed

Lines changed: 2 additions & 35 deletions

File tree

.github/workflows/deploy-dev.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,6 @@ jobs:
5656
echo "${{ secrets.APPLICANT_SYNC_MAPPING_DATA }}" > src/main/resources/applicant-sync-mapping-data.yml
5757
find src
5858
59-
# Additional Gradle Caches for better performance
60-
- name: Cache Gradle packages
61-
uses: actions/cache@v4
62-
with:
63-
path: |
64-
~/.gradle/caches
65-
~/.gradle/wrapper
66-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
67-
restore-keys: |
68-
${{ runner.os }}-gradle-
69-
7059
- name: Clean Build with Gradle (with Testing)
7160
env:
7261
JWT_ACCESS_KEY: ${{ secrets.JWT_ACCESS_KEY }}

.github/workflows/deploy-prod.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
workflow_dispatch:
8+
# 수동 실행 시, 태그 지정 된 것으로 배포됨. push로 자동 실행 시, 해당 push로 만들어진 sha태그로 배포됨.
89
inputs:
910
tag:
1011
description: 'Optional explicit prod tag (default: prod-latest)'
@@ -47,16 +48,6 @@ jobs:
4748
test -s src/main/resources/applicant-sync-mapping-data.yml
4849
head -n 2 src/main/resources/applicant-sync-mapping-data.yml
4950
50-
- name: Cache Gradle packages
51-
uses: actions/cache@v4
52-
with:
53-
path: |
54-
~/.gradle/caches
55-
~/.gradle/wrapper
56-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
57-
restore-keys: |
58-
${{ runner.os }}-gradle-
59-
6051
- name: Clean Build with Gradle (with Testing)
6152
env:
6253
JWT_ACCESS_KEY: ${{ secrets.JWT_ACCESS_KEY }}
@@ -105,15 +96,6 @@ jobs:
10596
with:
10697
registry-type: public
10798

108-
- name: Cache Docker layers
109-
uses: actions/cache@v4
110-
with:
111-
path: /tmp/.buildx-cache
112-
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile') }}-${{ github.sha }}
113-
restore-keys: |
114-
${{ runner.os }}-buildx-${{ hashFiles('Dockerfile') }}-
115-
${{ runner.os }}-buildx-
116-
11799
- name: Build, tag, and push image to Amazon ECR
118100
env:
119101
ECR_REGISTRY: public.ecr.aws/${{ vars.ECR_PUBLIC_REGISTRY_ID }}
@@ -132,15 +114,11 @@ jobs:
132114
--push \
133115
--provenance=false \
134116
--cache-from "type=gha" \
135-
--cache-from "type=local,src=/tmp/.buildx-cache" \
136117
--cache-to "type=gha,mode=max" \
137-
--cache-to "type=local,dest=/tmp/.buildx-cache-new,mode=max" \
138118
-t $ECR_REGISTRY/$ECR_REPOSITORY:$PROD_IMAGE_SHA_TAG \
139119
-t $ECR_REGISTRY/$ECR_REPOSITORY:$PROD_IMAGE_LATEST_TAG \
140120
.
141121
142-
rm -rf /tmp/.buildx-cache
143-
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
144122
145123
- name: Deploy to AWS EC2
146124
env:
@@ -184,7 +162,7 @@ jobs:
184162
if [ -n "$INPUT_DEPLOY_TAG" ]; then
185163
DEPLOY_TAG="$INPUT_DEPLOY_TAG"
186164
else
187-
DEPLOY_TAG="prod-latest"
165+
DEPLOY_TAG="prod-${GITHUB_SHA}"
188166
fi
189167
190168
echo "SERVER_PORT=$SERVER_PORT" >> .env.prod

0 commit comments

Comments
 (0)