Merge pull request #147 from ALOC-UOS/refactor/scraping-service #403
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
# 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: CI | |
on: | |
push: | |
branches: [ "main", "deploy" ] | |
pull_request: | |
branches: [ "main", "deploy" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Make gradlew executable | |
run: chmod +x gradlew | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle- | |
- name: Create application.yml | |
run: | | |
mkdir -p ./src/main/resources | |
cd ./src/main/resources | |
echo "${{ secrets.APPLICATION }}" base64 -d > application.yml | |
echo "${{ secrets.JWT_APPLICATION }}" base64 -d > application-jwt.yml | |
echo "${{ secrets.TEST_APPLICATION }}" base64 -d > application-test.yml | |
- name: Install PostgreSQL client | |
run: sudo apt-get install -y postgresql-client | |
- name: Build with Gradle Wrapper | |
run: ./gradlew build --parallel --daemon |