Skip to content

#290 : 신규 이벤트 적재 구현해요 #30

#290 : 신규 이벤트 적재 구현해요

#290 : 신규 이벤트 적재 구현해요 #30

Workflow file for this run

name: CI
on:
pull_request:
types:
- opened
- reopened
- synchronize
env:
CACHE_VERSION: 1 # Increment this to invalidate the cache.
JAVA_VERSION: 17
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: ${{ env.JAVA_VERSION }}
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle*', '**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: add local.properties
run: |
echo KAKAO_APP_KEY=\"${{ secrets.KAKAO_APP_KEY }}\" >> ./local.properties
echo SCHEME_KAKAO_APP_KEY=\"${{ secrets.SCHEME_KAKAO_APP_KEY }}\" >> ./local.properties
echo MOCK_BASE_URL=\"${{ secrets.MOCK_BASE_URL }}\" >> ./local.properties
echo FACEBOOK_APP_ID=\"${{ secrets.FACEBOOK_APP_ID }}\" >> ./local.properties
echo BASE_URL=\"${{ secrets.BASE_URL }}\" >> ./local.properties
echo SIGNED_STORE_PASSWORD=${{ secrets.SIGNED_STORE_PASSWORD }} >> ./local.properties
echo SIGNED_KEY_ALIAS=${{ secrets.SIGNED_KEY_ALIAS }} >> ./local.properties
echo SIGNED_KEY_PASSWORD=${{ secrets.SIGNED_KEY_PASSWORD }} >> ./local.properties
- name: add keystore
run: |
mkdir ./app/keystore
echo '${{ secrets.RELEASE_KEYSTORE }}' > ./app/keystore/keystore.b64
base64 -d -i ./app/keystore/keystore.b64 > ./app/keystore/release.keystore
- name: add google-services.json
run: |
echo '${{ secrets.GOOGLE_SERVICES_JSON_DEV }}' > ./app/src/dev/google-services.json
echo '${{ secrets.GOOGLE_SERVICES_JSON_REAL }}' > ./app/src/real/google-services.json
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Lint Code Style
run: ./gradlew ktlintCheck detekt
- name: Send Success Message
if: ${{ success() }}
uses: Ilshidur/action-discord@0.3.2
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: BFF BOT
DISCORD_AVATAR: https://github.com/YAPP-Github/24th-App-Team-1-Android/assets/77484719/611fc015-8f91-4645-90c9-2ae9e86d9e7b
DISCORD_EMBEDS: |
[
{
"author": {
"name": "${{ github.event.pull_request.user.login }}",
"url": "https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true",
"icon_url": "${{ github.event.pull_request.user.avatar_url }}"
},
"title": "PR 성공, 리뷰 자~ 두 과 자 ~! 🥰🥰 \n#${{ github.event.pull_request.number }} : ${{ github.event.pull_request.title }}",
"color": 10478271,
"description": "${{ github.event.pull_request.html_url }}",
"fields": [
{
"name": "Base Branch",
"value": "${{ github.base_ref }}",
"inline": true
},
{
"name": "Compare Branch",
"value": "${{ github.head_ref }}",
"inline": true
}
]
}
]
- name: Send Failure Message
if: ${{ failure() }}
uses: Ilshidur/action-discord@0.3.2
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: BFF BOT
DISCORD_AVATAR: https://github.com/YAPP-Github/24th-App-Team-1-Android/assets/77484719/611fc015-8f91-4645-90c9-2ae9e86d9e7b
DISCORD_EMBEDS: |
[
{
"author": {
"name": "${{ github.event.pull_request.user.login }}",
"url": "https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true",
"icon_url": "${{ github.event.pull_request.user.avatar_url }}"
},
"title": "PR 실패. 제니짱, 10번 아이언 가져와 🏌️‍♀️🏌️‍♀️ \n#${{ github.event.pull_request.number }} : ${{ github.event.pull_request.title }}",
"color": 13458524,
"description": "${{ github.event.pull_request.html_url }}",
"fields": [
{
"name": "Base Branch",
"value": "${{ github.base_ref }}",
"inline": true
},
{
"name": "Compare Branch",
"value": "${{ github.head_ref }}",
"inline": true
}
]
}
]