-
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.
- Loading branch information
Showing
1 changed file
with
20 additions
and
29 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 |
---|---|---|
@@ -1,43 +1,34 @@ | ||
name: Pull Request Gradle Build Test | ||
name: Java CI with Gradle | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, synchronize, closed ] | ||
push: | ||
branches: [ "feature/#4-set-deploy-pipeline" ] | ||
|
||
permissions: read-all | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-test: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/[email protected] | ||
|
||
- uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
application: | ||
- 'build.gradle.kts' | ||
- '**/src/**' | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: JDK 설치 | ||
if: steps.changes.outputs.application == 'true' | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: 17 | ||
cache: 'gradle' | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
## gradle build | ||
- name: Build with Gradle | ||
run: ./gradlew bootJar | ||
|
||
- name: gradlew 권한 부여 | ||
run: chmod +x ./gradlew | ||
|
||
- name: Gradle Build | ||
if: steps.changes.outputs.application == 'true' | ||
env: | ||
JASYPT_ENCRYPTION_PASSWORD: ${{ secrets.PROPERTY_ENCRYPTION_PASSWORD }} | ||
## 웹 이미지 빌드 및 도커허브에 push | ||
- name: web docker build and push | ||
run: | | ||
./gradlew build --no-build-cache | ||
docker login -u egg528 -p tkfkd0104! | ||
docker build --no-cache -t egg528/test . | ||
docker push egg528/test |