File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,6 @@ terraform/
4747* .trace.db
4848
4949# Environment
50- .env
51- .env.local
5250
5351# Docker
5452docker-compose.yml
Original file line number Diff line number Diff line change 1010 CONTAINER_PORT : 8080 # 컨테이너 내부 포트(스프링부트)
1111 EC2_INSTANCE_TAG_NAME : team12-ec2-1 # 배포 대상 EC2 Name 태그
1212 DOCKER_NETWORK : common # 도커 네트워크
13- BACKEND_DIR : .
13+ BACKEND_DIR : . # Dockerfile 위치
1414
1515concurrency :
1616 group : ${{ github.workflow }}-${{ github.ref }} # 커밋이 짧은 시간안에 몰려도 최신 커밋에 대해서만 액션이 수행되도록
2020 push :
2121 paths :
2222 - " .github/workflows/**"
23- - " .env"
2423 - " src/**"
2524 - " build.gradle.kts"
2625 - " settings.gradle.kts"
8685 DOT_ENV : ${{ secrets.DOT_ENV }}
8786 run : |
8887 # .env가 없으면 빌드 캐시가 매번 깨질 수 있으므로 항상 생성
89- echo "$DOT_ENV" > .env
90- echo "$DOT_ENV"
91- ls .env
88+ mkdir -p "${{ env.BACKEND_DIR }}"
89+ printf "%s" "${DOT_ENV}" > "${{ env.BACKEND_DIR }}/.env"
9290
9391 - name : Docker Buildx 설치
9492 uses : docker/setup-buildx-action@v3
@@ -112,7 +110,7 @@ jobs:
112110 - name : 빌드 앤 푸시
113111 uses : docker/build-push-action@v6
114112 with :
115- context : .
113+ context : ${{ env.BACKEND_DIR }}
116114 push : true
117115 cache-from : type=gha
118116 cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments