develop -> prod 머지 #20
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
name: ShowPot-Prod-CI | |
on: | |
pull_request: | |
branches: | |
- prod | |
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: 'liberica' | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Copy Secrets | |
uses: microsoft/variable-substitution@v1 | |
with: | |
files: | | |
./app/src/main/resources/application-prod.yml, | |
./app/src/main/resources/application-cloud-prod.yml, | |
./app/domain/common-domain/src/main/resources/application-domain-prod.yml | |
./app/infrastructure/spotify/src/main/resources/application-spotify-prod.yml | |
env: | |
token.secret-key: ${{ secrets.TOKEN_SECRET_KEY }} | |
cloud.aws.credentials.accessKey: ${{ secrets.AWS_ACCESS_KEY }} | |
cloud.aws.credentials.secretKey: ${{ secrets.AWS_SECRET_KEY }} | |
cloud.aws.region: ${{ secrets.AWS_REGION }} | |
cloud.aws.s3.bucket: ${{ secrets.AWS_BUCKET }} | |
spring.datasource.url: ${{ secrets.APPLICATION_DATASOURCE_URL_PROD }} | |
spring.datasource.username: ${{ secrets.APPLICATION_DATASOURCE_USERNAME_PROD }} | |
spring.datasource.password: ${{ secrets.APPLICATION_DATASOURCE_PASSWORD_PROD }} | |
spring.data.redis.host: ${{ secrets.REDIS_HOST_PROD }} | |
spring.data.redis.port: ${{ secrets.REDIS_PORT_PROD }} | |
spotify.client-id: ${{ secrets.SPOTIFY_CLIENT_ID }} | |
spotify.client-secret: ${{ secrets.SPOTIFY_CLIENT_SECRET }} | |
- name: Build with Gradle Wrapper | |
run: ./gradlew clean build -Dspring.profiles.active=prod | |
- name: Backend CI Discord Notification | |
uses: sarisia/actions-status-discord@v1 | |
if: success() | |
with: | |
title: ✅ showpot-core-BE 운영 서버 CI 프로세스가 완료되었습니다! ✅ | |
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
content: "<@1084774841460215839> <@749533823057920030> ShoPot 이슈 혹은 PR을 확인해주세요!" | |
color: 00FF00 | |
username: showPot-Bot | |
avatar_url: ${{ secrets.DISCORD_NOTIFICATION_SUCCESS_AVATAR_URL }} | |
- name: Backend CI Discord Notification | |
uses: sarisia/actions-status-discord@v1 | |
if: failure() | |
with: | |
title: ❗️showpot-core-BE 운영 서버 CI 프로세스가 실패했습니다! ❗️ | |
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
color: FF0000 | |
username: showPot-Bot | |
avatar_url: ${{ secrets.DISCORD_NOTIFICATION_FAILED_AVATAR_URL }} |