Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[STMT-6] 👷 CI-CD workflow 수정 - 환경변수 설정 (#17) #18

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name: CI/CD using github actions & docker

# event trigger
# main 브랜치에 push가 되었을 때 실행
on:
push:
branches:
Expand All @@ -16,14 +15,23 @@ jobs:
runs-on: ubuntu-latest
steps:

# JDK setting - github actions에서 사용할 JDK 설정
# JDK setting
- name: Checkout
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: set environment variables
working-directory: ./
run: |
pwd
touch src/main/resources/application-secret.properties
echo ${{ secrets.ENV }} >> src/main/resources/application-secret.properties

# gradle caching - 빌드 시간 향상
- name: Gradle Caching
uses: actions/cache@v3
Expand All @@ -35,7 +43,6 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-


# docker login
- name: Login to Docker Hub
uses: docker/login-action@v1
Expand Down Expand Up @@ -66,5 +73,4 @@ jobs:
sudo docker stop stumeet-server
docker container prune -f
sudo docker run -it -d -p 8080:8080 --name stumeet-server ${{ secrets.DOCKER_USERNAME }}/server
sudo docker image prune -f

sudo docker image prune -f
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ out/

### VS Code ###
.vscode/

application-secret.properties