From ec429a8a93a58ab509452d22dd4188dce998e463 Mon Sep 17 00:00:00 2001 From: pbcccbeatboard-strato <166491205+pbcccbeatboard-strato@users.noreply.github.com> Date: Tue, 13 Aug 2024 11:15:51 +0900 Subject: [PATCH] Create continuous-integration.yaml --- .github/workflows/continuous-integration.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/continuous-integration.yaml diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml new file mode 100644 index 0000000..eed7270 --- /dev/null +++ b/.github/workflows/continuous-integration.yaml @@ -0,0 +1,52 @@ +name: Continuous Integration (CI) +on: + push: + branches: ["main"] + pull_request: + branches: + - main + paths-ignore: + - "**.md" + - ".gitignore" + - ".git/**" + - "CODE_OF_CONFUCT.md" + - "CONTRIBUTING.md" + - "LICENSE" + - "README.md" +jobs: + build-source-code: + name: Build 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: + java-version: '17' + distribution: 'temurin' + + - name: Test build & image create + run: echo '======== gradle build & docker build ========' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 + + - name: grant execute permission for gradlew + run: chmod +x gradlew + shell: bash + + - name: Build with Gradle Wrapper + run: ./gradlew clean build --stacktrace + + - name: Build image + env: + IMAGE_NAME: ${{ github.event.repository.name }} + run: docker build . --file Dockerfile --tag $IMAGE_NAME + + + +