java-workflow/.github/workflows/maven-thrift-build.yml

41 lines
1.2 KiB
YAML
Raw Normal View History

2022-01-19 13:03:21 +00:00
name: Maven Build Artifact
on:
workflow_call:
2022-01-27 14:28:42 +00:00
inputs:
java-version:
description: 'Java version'
required: false
2022-11-15 16:04:54 +00:00
default: "17"
2022-01-27 14:28:42 +00:00
type: string
java-distribution:
description: 'Java distribution'
required: false
2022-11-15 16:04:54 +00:00
default: "temurin"
2022-01-27 14:28:42 +00:00
type: string
2022-01-19 13:03:21 +00:00
jobs:
build:
2023-05-18 14:36:56 +00:00
runs-on: ubuntu-22.04
2022-01-19 13:03:21 +00:00
steps:
- name: Install thrift
2024-06-20 16:11:04 +00:00
uses: valitydev/action-setup-thrift@v1.0.3
2022-01-19 13:03:21 +00:00
- name: Checkout Repo
uses: actions/checkout@v3
2022-01-19 13:03:21 +00:00
with:
fetch-depth: 0
- name: Set up Maven
uses: actions/setup-java@v3
2022-01-19 13:03:21 +00:00
with:
2022-01-27 14:28:42 +00:00
java-version: ${{ inputs.java-version }}
distribution: ${{ inputs.java-distribution }}
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
2023-05-05 09:59:08 +00:00