Skip to content

Commit

Permalink
Merge pull request #208 from Juinjang/cicd/#203
Browse files Browse the repository at this point in the history
cicd: add build process in cd.yml(#203)
  • Loading branch information
yeon015 authored Sep 2, 2024
2 parents 72e9694 + 0205a81 commit 6e6b455
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 27 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/dev-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Create application-dev.yml
run: |
mkdir -p ./src/main/resources
echo "${{ secrets.PROPERTIES_DEV }}" > ./src/main/resources/application-dev.yml
shell: bash

- name: Create .p8
run: |
echo "${{ secrets.APPLE_AUTH }}" > ./src/main/resources/AUTHKEY_JUINJAG.p8
shell: bash

- name: Build With Gradle
run: ./gradlew build -x test


- name: Login to Docker Hub
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,5 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Create application-dev.yml
if: contains(github.ref, 'dev')
run: |
mkdir -p ./src/main/resources
echo "${{ secrets.PROPERTIES_DEV }}" > ./src/main/resources/application-dev.yml
shell: bash

- name: Create .p8
if: contains(github.ref, 'dev')
run: |
echo "${{ secrets.APPLE_AUTH }}" > ./src/main/resources/AUTHKEY_JUINJAG.p8
shell: bash

- name: Build With Gradle
run: ./gradlew build -x test
17 changes: 17 additions & 0 deletions .github/workflows/prod-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Create application-prod.yml
run: |
mkdir -p ./src/main/resources
echo "${{ secrets.PROPERTIES_PROD }}" > ./src/main/resources/application-prod.yml
shell: bash

- name: Create .p8
run: |
echo "${{ secrets.APPLE_AUTH }}" > ./src/main/resources/AUTHKEY_JUINJAG.p8
shell: bash

- name: Build With Gradle
run: ./gradlew build -x test

- name: Login to Docker Hub
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
Expand Down
15 changes: 1 addition & 14 deletions .github/workflows/prod-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# .github/workflows/dev-ci.yml
# .github/workflows/prod-ci.yml
name: CI-Prod

on:
Expand Down Expand Up @@ -34,18 +34,5 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Create application-prod.yml
if: contains(github.ref, 'dev')
run: |
mkdir -p ./src/main/resources
echo "${{ secrets.PROPERTIES_DEV }}" > ./src/main/resources/application-prod.yml
shell: bash

- name: Create .p8
if: contains(github.ref, 'dev')
run: |
echo "${{ secrets.APPLE_AUTH }}" > ./src/main/resources/AUTHKEY_JUINJAG.p8
shell: bash

- name: Build With Gradle
run: ./gradlew build -x test

0 comments on commit 6e6b455

Please sign in to comment.