Update build-test.yaml #268
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Feature Branch CI | |
on: | |
push: | |
branches: | |
- feature/** | |
- fix | |
- hotfix | |
pull_request: | |
branches: | |
- main | |
- develop | |
- fix | |
- hotfix | |
jobs: | |
build-and-package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Create and configure application.yml | |
run: | | |
mkdir -p baebae-BE/src/main/resources | |
mkdir -p baebae-BE/src/test/resources | |
echo "${{ secrets.APPLICATION_YML }}" > baebae-BE/src/main/resources/application.yml | |
echo "${{ secrets.APPLICATION_DEPLOY_YML }}" > baebae-BE/src/main/resources/application-deploy.yml | |
echo "${{ secrets.TEST_APPLICATION_YML }}" > baebae-BE/src/test/resources/application.yml | |
echo "${{ secrets.APPLICATION_TEST_YML }}" > baebae-BE/src/test/resources/application-test.yml | |
- name: Create Firebase credentials file in main resources | |
run: | | |
echo "${{ secrets.FIREBASE_CREDENTIALS_JSON }}" > baebae-BE/src/main/resources/baebae-ff525-firebase-adminsdk-zbc8h-7fd10e518b.json | |
- name: Create Firebase credentials file in test resources | |
run: | | |
echo "${{ secrets.FIREBASE_CREDENTIALS_JSON }}" > baebae-BE/src/test/resources/baebae-ff525-firebase-adminsdk-zbc8h-7fd10e518b.json | |
- name: Display Firebase credentials file in main resources | |
run: cat baebae-BE/src/main/resources/baebae-ff525-firebase-adminsdk-zbc8h-7fd10e518b.json | |
- name: Display Firebase credentials file in test resources | |
run: cat baebae-BE/src/test/resources/baebae-ff525-firebase-adminsdk-zbc8h-7fd10e518b.json | |
- name: Build with Gradle | |
run: | | |
cd baebae-BE | |
chmod +x ./gradlew | |
./gradlew build |