Skip to content

Commit

Permalink
[FEAT] CI yml 파일 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
josushell authored Jan 22, 2024
1 parent 30cc0ef commit 596d1bd
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,38 @@ on:

jobs:
build:

runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}

steps:
- uses: actions/checkout@v3
- name: set up JDK 11

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
distribution: zulu
java-version: 17
cache: gradle

- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build

- name: test Detekt
run: ./gradlew detekt
- name: test Ktlint
run: ./gradlew ktlintCheck

- name: Build with Gradle
run: ./gradlew build

- name: send to Slack
uses: 8398a7/action-slack@v3
with:
Expand Down

1 comment on commit 596d1bd

@easyhooon
Copy link
Collaborator

@easyhooon easyhooon commented on 596d1bd Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github) Github actions에서 Secrets로 환경변수 관리하기

SERVER_BASE_URL 상수를 감추려구 secret.properties 파일에 따로 빼놨거든

github secrets 에 secret.properties 등록하구 아래 step 을 test Detekt step 보다 앞에 넣으면 될것같아

    - name: Generate secrets.properties
        run: |
          echo "SERVER_BASE_URL=${{ secrets.SERVER_BASE_URL }}" >> secrets.properties

https://github.com/Nexters/BandalArt-Android/blob/develop/.github/workflows/android-ci.yml

Please sign in to comment.