Update main.yml #11
This file contains hidden or 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: workflow of java springboot | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
jobs: | ||
build: | ||
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: 'temurin' | ||
- name: Cache Maven Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Get Maven Build Version | ||
id: get-verison | ||
run: | | ||
echo "version=$(mvn help:evlatue -Dexpression=project.version -q -DforceStdout | tail -1)" >> $GITHUB_OUTPUT | ||
Shell: bash | ||
- name: Build with Maven | ||
run: mvn clean package # / mvn build , mvn test path- /. src/tests/com/optum/optumlabs/AuthBridge/AuthBridgeControllerTest.java |