Улучшение CI/CD
This commit is contained in:
@@ -27,7 +27,18 @@ jobs:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
|
||||
- name: Install maven IF not Exists
|
||||
run: |
|
||||
if ! command -v mvn &> /dev/null; then
|
||||
echo "Maven not found, installing..."
|
||||
if command -v apt-get &> /dev/null; then
|
||||
sudo apt-get update && sudo apt-get install -y maven
|
||||
elif command -v brew &> /dev/null; then
|
||||
brew install maven
|
||||
fi
|
||||
else
|
||||
echo "Maven is already installed."
|
||||
fi
|
||||
- name: Build with Maven
|
||||
run: mvn clean package
|
||||
|
||||
|
||||
Reference in New Issue
Block a user