From 04c903ec00b7e9fade4a13d02dac106e225b6359 Mon Sep 17 00:00:00 2001 From: Sion Shin Date: Mon, 16 Oct 2023 15:22:35 +0900 Subject: [PATCH] Create build-test.yml --- .github/workflows/build-test.yml | 48 ++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/build-test.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 00000000..64e2d4c1 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,48 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle +name: Build Test + +on: + pull_request: + branches: + - main + +permissions: + pull-requests: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + + - name: Make gradlew executable + run: chmod +x gradlew + + - name: Create application.yml + run: | + mkdir -p ./src/main/resources + cd ./src/main/resources + echo "${{ secrets.APPLICATION }}" base64 -d > application.yml + + - name: Create service-account-file.json + run: | + mkdir -p ./src/main/resources/firebase + cd ./src/main/resources/firebase + echo "${{ secrets.SERVICE_ACCOUNT_FILE }}" base64 -d > service-account-file.json + + - name: Build with Gradle + run: ./gradlew clean build \ No newline at end of file