From 90aebe2dff7a571a22f655fdb67bb1bce069bcd6 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Wed, 3 Jul 2024 17:22:53 +0900 Subject: [PATCH] [ADD/#3] add pr_checker --- .github/workflows/pr_checker.yml | 45 +++++++++++++++++++ app/build.gradle.kts | 4 +- .../com/terning/point/di/RetrofitModule.kt | 2 +- 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/pr_checker.yml diff --git a/.github/workflows/pr_checker.yml b/.github/workflows/pr_checker.yml new file mode 100644 index 000000000..b73cb7ff0 --- /dev/null +++ b/.github/workflows/pr_checker.yml @@ -0,0 +1,45 @@ +name: TerningPoint PR Checker + +on: + pull_request: + branches: [ develop ] + +defaults: + run: + shell: bash + working-directory: . + +jobs: + build: + name: PR Checker + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Gradle cache + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: set up JDK 1.8 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 1.8 + + - name: Change gradlew permissions + run: chmod +x ./gradlew + + - name: Create Local Properties + run: touch local.properties + + - name: Access Local Properties + env: + base_url: ${{ secrets.BASE_URL }} + run: | + echo base.url=\"$base_url\" >> local.properties \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d41668200..e0b137d3c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -29,8 +29,8 @@ android { debug { buildConfigField( "String", - "OPEN_BASE_URL", - gradleLocalProperties(rootDir, providers).getProperty("open.base.url") + "BASE_URL", + gradleLocalProperties(rootDir, providers).getProperty("base.url") ) } release { diff --git a/app/src/main/java/com/terning/point/di/RetrofitModule.kt b/app/src/main/java/com/terning/point/di/RetrofitModule.kt index 8d086aeb3..961fa891b 100644 --- a/app/src/main/java/com/terning/point/di/RetrofitModule.kt +++ b/app/src/main/java/com/terning/point/di/RetrofitModule.kt @@ -70,7 +70,7 @@ object RetrofitModule { client: OkHttpClient, factory: Converter.Factory ): Retrofit = Retrofit.Builder() - .baseUrl(BuildConfig.OPEN_BASE_URL) + .baseUrl(BuildConfig.BASE_URL) .addConverterFactory(factory) .client(client) .build()