From d8ed7e7a511caf0680a1579632fa41739e9a9d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=9A=A8=EB=AF=BC?= <78139690+HyomK@users.noreply.github.com> Date: Thu, 22 Feb 2024 02:13:28 +0900 Subject: [PATCH] Update ktlint.yml --- .github/workflows/ktlint.yml | 58 ++++++++++++++---------------------- 1 file changed, 22 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ktlint.yml b/.github/workflows/ktlint.yml index cb3a4e2..23b8c3e 100644 --- a/.github/workflows/ktlint.yml +++ b/.github/workflows/ktlint.yml @@ -10,6 +10,12 @@ jobs: runs-on: ubuntu-latest + env: + KEY_ALIAS: ${{ secrets.KEY_ALIAS }} + STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} + KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} + BASE_URL: ${{secrets.BASE_URL}} + steps: - uses: actions/checkout@v3 - name: set up JDK 17 @@ -28,46 +34,26 @@ jobs: shell: bash env: API_KEY: ${{ secrets.BASE_URL }} - - - name: STORE_FILE - run: | - echo STORE_FILE=$STORE_FILE > local.properties - shell: bash - env: - API_KEY: ${{ secrets.KEY_PATH }} - - - name: KEY_PASSWORD - run: | - echo KEY_PASSWORD=$KEY_PASSWORD > local.properties - shell: bash - env: - API_KEY: ${{ secrets.BASE_URL }} - - - name: KEY_ALIAS - run: | - echo KEY_ALIAS=$KEY_ALIAS > local.properties - shell: bash - env: - API_KEY: ${{ secrets.BASE_URL }} - - name: STORE_PASSWORD + - name: Download Android keystore + id: android_keystore + uses: timheuer/base64-to-file@v1.0.3 + with: + fileName: key.jks + encodedString: ${{ secrets.STORE_FILE }} + + - name: Create key.properties run: | - echo STORE_PASSWORD=$STORE_PASSWORD > local.properties - shell: bash - env: - API_KEY: ${{ secrets.BASE_URL }} - - - - name: Create properties file - run: cat /home/runner/work/Don-t-Forget---Android/Don-t-Forget---Android/local.properties - - - name: Putting properties data - env: - DATA: ${{ secrets.LOCAL_PROPERTIES }} - run: echo $DATA > /home/runner/work/Don-t-Forget---Android/Don-t-Forget---Android/local.properties - + echo "STORE_FILE=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties + echo "STORE_PASSWORD=${{ secrets.STORE_PASSOWRD }}" >> android/key.properties + echo "KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> android/key.properties + echo "KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> android/key.properties + + - name: Ktlint Check run: ./gradlew --no-daemon ktlintCheck --continue + + - name: Create file run: cat /home/runner/work/Don-t-Forget---Android/Don-t-Forget---Android/app/google-services.json | base64