Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

[UI] 홈-탄소저감 화면 구현 #23

[UI] 홈-탄소저감 화면 구현

[UI] 홈-탄소저감 화면 구현 #23

name: Plantory CI - PR Checker
on:
pull_request:
branches: [ develop ]
jobs:
build:
name: PR Checker
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Set up Android SDK
uses: android-actions/setup-android@v2
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Add Local Properties
env:
BASE_URl: ${{secrets.BASE_URL}}
run:
echo base.url=\"$_BASE_URL\" >> ./local.properties
- name: Get Google Services JSON
env:
GOOGLE_SERVICES_JSON: ${{secrets.GOOGLE_SERVICES_JSON}}
run:
echo $GOOGLE_SERVICES_JSON > ./app/google-services.json
- name: Build with Gradle
run: ./gradlew build
- name: Run ktlint
run: ./gradlew ktlintCheck
- name: If Success, Send notification on Slack
if: ${{success()}}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: '#60E0C5'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_TITLE: 'Plantory PR Checker have passed ✅'
MSG_MINIMAL: true
SLACK_USERNAME: Plantory Android
SLACK_MESSAGE: 'Plantory Android PR Check Success 🎉'
- name: If Fail, Send notification on Slack
if: ${{failure()}}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: '#ff0000'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_TITLE: 'Plantory PR Checker have failed ✅'
MSG_MINIMAL: true
SLACK_USERNAME: Plantory Android
SLACK_MESSAGE: 'Plantory Android PR Check Failure - Should Check Up'