-
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.
refactor: pullrequest와 push일 때 githubAction 행위 나누기 (#99)
- Loading branch information
Showing
2 changed files
with
60 additions
and
2 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 |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
on: | ||
push: | ||
branches: develop | ||
pull_request: | ||
branches: develop | ||
|
||
# 작업 내용 | ||
jobs: | ||
|
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,60 @@ | ||
# 실행 시기 | ||
on: | ||
pull_request: | ||
branches: develop | ||
|
||
# 작업 내용 | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
redis: | ||
image: redis:latest | ||
ports: | ||
- 6379:6379 | ||
steps: | ||
- name: Chekcout Main Branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
|
||
- name: Set application.yml | ||
uses: microsoft/variable-substitution@v1 | ||
with: | ||
files: src/main/resources/application.yml | ||
env: | ||
spring.datasource.url: ${{ secrets.RDS_ENDPOINT }} | ||
spring.datasource.username: ${{ secrets.RDS_USERNAME }} | ||
spring.datasource.password: ${{ secrets.RDS_PASSWORD }} | ||
spring.data.redis.host: ${{ secrets.REDIS_ENDPOINT }} | ||
logging.slack.webhook-uri: ${{ secrets.SLACK_URL }} | ||
jwt.secretkey: ${{ secrets.SECRETKEY }} | ||
cloud.aws.credentials.access-key: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
cloud.aws.credentials.secret-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
imp.api-secret-key: ${{ secrets.API_SECRET_KEY }} | ||
imp.api-key: ${{ secrets.API_KEY }} | ||
|
||
|
||
## gradle caching/빌드 시간 단축 | ||
- name: Gradle Caching | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Grant Permission Gradlew | ||
run: chmod +x gradlew | ||
shell: bash | ||
|
||
- name: Build Gradle | ||
run: ./gradlew build | ||
shell: bash |