2022-01-19 13:03:21 +00:00
|
|
|
name: Maven Build Artifact
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- name: Install thrift
|
|
|
|
uses: valitydev/action-setup-thrift@v0.0.5
|
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Maven
|
|
|
|
uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
java-version: '15'
|
|
|
|
distribution: 'adopt'
|
2022-01-27 13:58:42 +00:00
|
|
|
cache: 'maven'
|
2022-01-19 13:03:21 +00:00
|
|
|
- name: Retrieve commit info
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=COMMIT_NUMBER::$(git rev-list HEAD --count)"
|
|
|
|
echo "::set-output name=SHA_7::${GITHUB_SHA::7}"
|
|
|
|
id: commit_info
|
|
|
|
- name: Build package
|
|
|
|
run: mvn --batch-mode -Dcommit.number=${{ steps.commit_info.outputs.COMMIT_NUMBER }} -Drevision="1.${{ steps.commit_info.outputs.COMMIT_NUMBER }}-${{ steps.commit_info.outputs.SHA_7 }}" clean compile -f pom.xml
|