From 4e7a944eae54ac1b7b3e76d43d767dba62ce4514 Mon Sep 17 00:00:00 2001 From: pbcccbeatboard-strato <166491205+pbcccbeatboard-strato@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:51:48 +0900 Subject: [PATCH] Update continuous-integration.yaml test workflow, build --- .github/workflows/continuous-integration.yaml | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index eed7270..8d4d40a 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -1,7 +1,7 @@ name: Continuous Integration (CI) on: push: - branches: ["main"] + branches: ["main", "dev"] pull_request: branches: - main @@ -14,15 +14,15 @@ on: - "LICENSE" - "README.md" jobs: - build-source-code: - name: Build source code + build-source-chk: + name: Check source code strategy: matrix: os: [ubuntu-22.04] runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v4 - + - name: Set up JDK 17 uses: actions/setup-java@v4 with: @@ -30,7 +30,7 @@ jobs: distribution: 'temurin' - name: Test build & image create - run: echo '======== gradle build & docker build ========' + run: echo 'gradle build & docker build' - name: Setup Gradle uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 @@ -39,9 +39,34 @@ jobs: run: chmod +x gradlew shell: bash + - name: Build with Gradle Wrapper + run: ./gradlew test + + build-source-and-container-image: + name: Build a container image + runs-on: ubuntu-22.04 + needs: build-source-chk + if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: grant execute permission for gradlew + run: chmod +x gradlew + shell: bash + - name: Build with Gradle Wrapper run: ./gradlew clean build --stacktrace + - name: chk directory + run: ls -al + - name: Build image env: IMAGE_NAME: ${{ github.event.repository.name }}