Skip to content

Build PR for MyPet

Build PR for MyPet #44

name: Build PR for MyPet
on:
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
BUILD_NUMBER: 1
JAR_FILE_NAME: ""
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'microsoft'
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('**/install_dependencies.sh') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Compile
run: mvn --batch-mode package -DGIT_COMMIT=${{ github.sha }} -DBUILD_NUMBER=${{ env.BUILD_NUMBER }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}