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

๐Ÿš‘ Hot Fix - CICD Path Error #38

Merged
merged 6 commits into from
Dec 4, 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
19 changes: 13 additions & 6 deletions .github/workflows/api-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ name: API Server CI/CD

on:
pull_request:
path: "server-api/**"
paths:
- "server-api/**"
paths-ignore:
- "client-app/**"
- "client-web/**"
- "client-api/**"
branches: [ "dev" ]
types:
- opened
Expand Down Expand Up @@ -38,22 +43,24 @@ jobs:
### application.yml ์„ค์ •
- name: Set YML
run: |
echo "${{ secrets.APPLICATION_YML }}" | base64 --decode > ./src/main/resources/application-dev.yml
echo "${{ secrets.APPLICATION_YML }}" | base64 --decode > ./server-api/src/main/resources/application-dev.yml

### Firebase Key ์„ค์ •
# - name: Set Firebase Key
# run: |
# mkdir -p ./src/main/resources/firebase
# echo "${{ secrets.FIREBASE_ADMIN_KEY }}" | base64 --decode > ./src/main/resources/firebase/firebase-admin-key.json
# mkdir -p ./server-api/src/main/resources/firebase
# echo "${{ secrets.FIREBASE_ADMIN_KEY }}" | base64 --decode > ./server-api/src/main/resources/firebase/firebase-admin-key.json

### gradlew ์‹คํ–‰ ๊ถŒํ•œ ๋ถ€์—ฌ
- name: Grant execute Permission for gradlew
run: |
chmod +x gradlew
cd ./server-api
chmod +x ./gradlew

### project build
- name: Build with Gradle
run: |
cd ./server-api
./gradlew clean build -x test

### Docker Image Build and Push
Expand All @@ -73,7 +80,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
file: ./dev.Dockerfile
file: ./server-api/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DEV_DOCKERHUB_REPONAME }}

Expand Down
2 changes: 1 addition & 1 deletion server-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM openjdk:17-alpine

WORKDIR /app

ARG JAR_PATH=./build/libs
ARG JAR_PATH=./server-api/build/libs

COPY ${JAR_PATH}/application.jar app.jar

Expand Down