From 3d299163ac1f83525feffc7998fb152af6bd5660 Mon Sep 17 00:00:00 2001 From: key Date: Sun, 26 May 2024 20:54:25 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20CI=20=EC=B2=AB=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/backendCI.yml | 71 +++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/backendCI.yml diff --git a/.github/workflows/backendCI.yml b/.github/workflows/backendCI.yml new file mode 100644 index 0000000..d9cfa15 --- /dev/null +++ b/.github/workflows/backendCI.yml @@ -0,0 +1,71 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle + +name: Backend CI + +on: + push: + branches: [ "dev", "BE/feat/#96" ] + paths: + - 'backend/**' + pull_request: + branches: [ "dev" ] + paths: + - 'backend/**' + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + with: + gradle-version: '8.5' + + - name: Build with Gradle Wrapper + env: + SPRING_DATASOURCE_URL: ${{ secrets.SPRING_DATASOURCE_URL }} + SPRING_DATASOURCE_PASSWORD: ${{ secrets.SPRING_DATASOURCE_PASSWORD }} + SPRING_DATASOURCE_USERNAME: ${{ secrets.SPRING_DATASOURCE_USERNAME }} + SPRING_DATASOURCE_DRIVER_CLASS_NAME: ${{ secrets.SPRING_DATASOURCE_DRIVER_CLASS_NAME }} + SPRING_JPA_DATABASE: ${{ secrets.SPRING_JPA_DATABASE }} + S3_BUCKET_URL: ${{ secrets.S3_BUCKET_URL }} + S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} + S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} + S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} + run: ./gradlew build + + dependency-submission: + + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. + # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 From c76f1bac548078534f3cc9b1181210413ea13ad0 Mon Sep 17 00:00:00 2001 From: key Date: Sun, 26 May 2024 21:00:44 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20CI=20=EC=B2=AB=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/backendCI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backendCI.yml b/.github/workflows/backendCI.yml index d9cfa15..e0fdaec 100644 --- a/.github/workflows/backendCI.yml +++ b/.github/workflows/backendCI.yml @@ -9,7 +9,7 @@ name: Backend CI on: push: - branches: [ "dev", "BE/feat/#96" ] + branches: [ "dev" ] paths: - 'backend/**' pull_request: From 303bd839b789817f87946c127dbd6ce8879aeceb Mon Sep 17 00:00:00 2001 From: key Date: Sun, 26 May 2024 21:02:58 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=EC=9E=84=EC=8B=9C=20=EB=B9=84?= =?UTF-8?q?=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yaml | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index fca8b41..126fcc8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -2,26 +2,26 @@ name: Deploy Spring Boot App # 워크플로우가 시작될 조건 설정 -on: - push: - branches: - - dev # 배포할 브랜치 설정 - -jobs: - deploy: - runs-on: ubuntu-latest # 실행 환경 설정 - - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Set up JDK 17 - uses: actions/setup-java@v2 - with: - java-version: '17' - - - name: Build with Gradle - run: ./gradlew build -x test # 테스트 제외하고 빌드 +#on: +# push: +# branches: +# - dev # 배포할 브랜치 설정 +# +#jobs: +# deploy: +# runs-on: ubuntu-latest # 실행 환경 설정 +# +# steps: +# - name: Checkout Repository +# uses: actions/checkout@v2 +# +# - name: Set up JDK 17 +# uses: actions/setup-java@v2 +# with: +# java-version: '17' +# +# - name: Build with Gradle +# run: ./gradlew build -x test # 테스트 제외하고 빌드 # - name: Build Docker Image # run: |