Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
egg528 committed Dec 21, 2023
1 parent b63b33a commit c81f950
Showing 1 changed file with 20 additions and 29 deletions.
49 changes: 20 additions & 29 deletions .github/workflows/build-image-to-dockerhub.yml
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

0 comments on commit c81f950

Please sign in to comment.