From 95e17565dbc6a9e4a87125a63fd382b6c0c99181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=86=8C=EB=AF=BC?= Date: Mon, 29 Apr 2024 12:52:59 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cicd.yml | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 840f24d..9cc0238 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -14,7 +14,9 @@ jobs: contents: read steps: - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: @@ -35,7 +37,6 @@ jobs: - name: Build with Gradle Wrapper run: ./gradlew build - env: ACTIVE_PROFILE: ${{ secrets.ACTIVE_PROFILE }} @@ -61,11 +62,32 @@ jobs: USER_DAFAULTIMAGE: ${{ secrets.USER_DAFAULTIMAGE }} + docker-build: + + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Grant execute permisson for gradlew + run: chmod +x gradlew + + - name: Build with Gradle (without Test) + run: ./gradlew clean build -x test --stacktrace + - name: Docker build run: | docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker build -t app . - sudo docker build --build-arg ACTIVE_PROFILE=${{ secrets.ACTIVE_PROFILE }} \ + docker build --build-arg ACTIVE_PROFILE=${{ secrets.ACTIVE_PROFILE }} \ --build-arg DATASOURCE_URL_DEV=${{ secrets.DATASOURCE_URL_DEV }} \ --build-arg DATASOURCE_USERNAME=${{ secrets.DATASOURCE_USERNAME }} \ --build-arg DATASOURCE_PASSWORD=${{ secrets.DATASOURCE_PASSWORD }} \