From 2aacd8296932350fbc23d818d7213417d4c3d997 Mon Sep 17 00:00:00 2001 From: Eunjin3395 Date: Wed, 1 Jan 2025 23:54:41 +0900 Subject: [PATCH 1/8] =?UTF-8?q?ci:=20=EB=B0=B0=ED=8F=AC=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=ED=99=98=EA=B2=BD=20=EB=B3=80=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/github_actions.yml | 9 ++++++--- src/main/resources/application.yml | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index ddd9511..63280a5 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -1,10 +1,13 @@ name: Challenge CI/CD Pipeline on: - pull_request: - types: [ closed ] + # pull_request: + # types: [ closed ] + # branches: + # - develop + pushes: branches: - - develop + - feat/66 jobs: build-and-deploy: # Job 이름 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 6c3a0c1..ce268ed 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -24,6 +24,10 @@ cloud: stack: auto: false +fcm: + file_path: firebase/firebase.json + project_id: ${FIREBASE_PROJECT_ID} + --- # 로컬 환경 spring: From 6bc231ade099d598dd4aef7a79e94ee245815fda Mon Sep 17 00:00:00 2001 From: Eunjin3395 Date: Wed, 1 Jan 2025 23:55:30 +0900 Subject: [PATCH 2/8] =?UTF-8?q?ci:=20github=5Factions.yml=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/github_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 63280a5..4bf5108 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -5,7 +5,7 @@ on: # types: [ closed ] # branches: # - develop - pushes: + push: branches: - feat/66 From 63d77666f6fd98336d3ec93c2da6047d1907a3d1 Mon Sep 17 00:00:00 2001 From: Eunjin3395 Date: Thu, 2 Jan 2025 00:08:07 +0900 Subject: [PATCH 3/8] =?UTF-8?q?ci:=20ci/cd=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/github_actions.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 4bf5108..bc13dc2 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -60,7 +60,9 @@ jobs: - name: Create firebase.json from Secret run: | mkdir -p src/main/resources/firebase + chmod 777 src/main/resources/firebase echo "${{ secrets.FIREBASE_JSON }}" > src/main/resources/firebase/firebase.json + cat src/main/resources/firebase/firebase.json | jq '.' # 7. Docker 이미지 생성 및 Push - name: Docker 이미지 생성 및 push From c7681349a853d8a1af4f1390ca67cc822d080b51 Mon Sep 17 00:00:00 2001 From: Eunjin3395 Date: Thu, 2 Jan 2025 00:10:48 +0900 Subject: [PATCH 4/8] =?UTF-8?q?ci:=20ci/cd=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/github_actions.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index bc13dc2..ec5d39d 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -62,6 +62,7 @@ jobs: mkdir -p src/main/resources/firebase chmod 777 src/main/resources/firebase echo "${{ secrets.FIREBASE_JSON }}" > src/main/resources/firebase/firebase.json + cat src/main/resources/firebase/firebase.json cat src/main/resources/firebase/firebase.json | jq '.' # 7. Docker 이미지 생성 및 Push From df0cc50abc7473bf753a5e93e7b0ccd94a9ba11e Mon Sep 17 00:00:00 2001 From: Eunjin3395 Date: Thu, 2 Jan 2025 00:15:43 +0900 Subject: [PATCH 5/8] =?UTF-8?q?ci:=20ci/cd=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/github_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index ec5d39d..8a06102 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -61,7 +61,7 @@ jobs: run: | mkdir -p src/main/resources/firebase chmod 777 src/main/resources/firebase - echo "${{ secrets.FIREBASE_JSON }}" > src/main/resources/firebase/firebase.json + printf "%s" "${{ secrets.FIREBASE_JSON }}" > src/main/resources/firebase/firebase.json cat src/main/resources/firebase/firebase.json cat src/main/resources/firebase/firebase.json | jq '.' From 6b2758cf99b438ada8c8d0007b44896c2c9dcadb Mon Sep 17 00:00:00 2001 From: Eunjin3395 Date: Thu, 2 Jan 2025 00:20:18 +0900 Subject: [PATCH 6/8] =?UTF-8?q?ci:=20ci/cd=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/github_actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 8a06102..35c84cf 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -61,9 +61,9 @@ jobs: run: | mkdir -p src/main/resources/firebase chmod 777 src/main/resources/firebase - printf "%s" "${{ secrets.FIREBASE_JSON }}" > src/main/resources/firebase/firebase.json + printf "%b" "${{ secrets.FIREBASE_JSON }}" > src/main/resources/firebase/firebase.json cat src/main/resources/firebase/firebase.json - cat src/main/resources/firebase/firebase.json | jq '.' + jq '.' src/main/resources/firebase/firebase.json # 7. Docker 이미지 생성 및 Push - name: Docker 이미지 생성 및 push From 51c9b2fbef14173365f249ddf4f7f1caee08c26b Mon Sep 17 00:00:00 2001 From: Eunjin3395 Date: Thu, 2 Jan 2025 00:38:20 +0900 Subject: [PATCH 7/8] =?UTF-8?q?ci:=20ci/cd=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/github_actions.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 35c84cf..689e5ee 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -57,11 +57,19 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} # 6. firebase 설정 파일 생성 - - name: Create firebase.json from Secret + - name: Prepare firebase directory run: | mkdir -p src/main/resources/firebase chmod 777 src/main/resources/firebase - printf "%b" "${{ secrets.FIREBASE_JSON }}" > src/main/resources/firebase/firebase.json + + - name: Download firebase.json + env: + FIREBASE_JSON_URL: ${{ secrets.FIREBASE_JSON_URL }} + run: | + curl -L "$FIREBASE_JSON_URL" -o src/main/resources/firebase/firebase.json + + - name: Verify firebase.json + run: | cat src/main/resources/firebase/firebase.json jq '.' src/main/resources/firebase/firebase.json From b400ad55552ea3415020ffd7147d56f5994d8281 Mon Sep 17 00:00:00 2001 From: Eunjin3395 Date: Thu, 2 Jan 2025 00:47:12 +0900 Subject: [PATCH 8/8] =?UTF-8?q?ci:=20github=5Factions.yml=20=EC=9B=90?= =?UTF-8?q?=EB=B3=B8=20=EC=86=8C=EC=8A=A4=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/github_actions.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 689e5ee..a907818 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -1,13 +1,10 @@ name: Challenge CI/CD Pipeline on: - # pull_request: - # types: [ closed ] - # branches: - # - develop - push: + pull_request: + types: [ closed ] branches: - - feat/66 + - develop jobs: build-and-deploy: # Job 이름 @@ -68,11 +65,6 @@ jobs: run: | curl -L "$FIREBASE_JSON_URL" -o src/main/resources/firebase/firebase.json - - name: Verify firebase.json - run: | - cat src/main/resources/firebase/firebase.json - jq '.' src/main/resources/firebase/firebase.json - # 7. Docker 이미지 생성 및 Push - name: Docker 이미지 생성 및 push uses: docker/build-push-action@v6