add spring-dotenv and some lines of code in gitea pipeline
All checks were successful
Gitea Action Maven build / build (push) Successful in 2m10s

This commit is contained in:
Eduard Kuksa 2025-02-18 20:42:55 +07:00
parent 90b0d6fe56
commit 3e0f5c6439
3 changed files with 25 additions and 11 deletions

View File

@ -13,12 +13,18 @@ jobs:
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: '3.9.9'
maven-version: 3.9.9
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
java-version: 21
distribution: 'oracle'
cache: 'maven'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Build, Test and Package with Maven
run: mvn -B verify --file pom.xml -e
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: searchengine-artifact
path: |
target/*.jar

View File

@ -3,14 +3,17 @@ server:
spring:
datasource:
username: root
password: hRMH94dJ
url: jdbc:mysql://localhost:3306/search_engine?useSSL=false&requireSSL=false&allowPublicKeyRetrieval=true
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
url: ${DB_URL}
# username: root
# password: hRMH94dJ
# url: jdbc:mysql://localhost:3306/search_engine?useSSL=false&requireSSL=false&allowPublicKeyRetrieval=true
jpa:
hibernate:
ddl-auto: update
# ddl-auto: update
# Ниже - временный вариант, таблица удаляется после завершения работы приложения
# ddl-auto: create-drop
ddl-auto: create-drop
show-sql: true
open-in-view: false

View File

@ -9,8 +9,8 @@
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>23</maven.compiler.source>
<maven.compiler.target>23</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
@ -45,5 +45,10 @@
<version>8.4.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>me.paulschwarz</groupId>
<artifactId>spring-dotenv</artifactId>
<version>4.0.0</version>
</dependency>
</dependencies>
</project>