-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[BE/feat/#96] CI 첫 구현
- Loading branch information
Showing
2 changed files
with
91 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" ] | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters