diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..06372dd --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,28 @@ +name: Java CI with Gradle + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +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: Setup Gradle + uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 + + - name: Build with Gradle Wrapper + run: ./gradlew build -x test \ No newline at end of file diff --git a/.gitignore b/.gitignore index c2065bc..4125023 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ build/ !**/src/main/**/build/ !**/src/test/**/build/ +.env + ### STS ### .apt_generated .classpath diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index ec9fc33..8dcd284 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -2,6 +2,9 @@ spring: application: name: onederful + config: + import: optional:file:.env[.properties] + datasource: url: ${DB_URL} username: ${DB_USERNAME}