Skip to content

Commit

Permalink
get app versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jianmingtu committed Mar 18, 2024
1 parent 885f419 commit b718d28
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,22 @@ jobs:
# secrets:
# nexus_url: ${{ secrets.NEXUS_URL }}

# app-version disabled since "Error: Process completed with exit code 1.", not sure exit code 1 is because of echo 1 (${version)
# app-version:
# uses: SierraSystems/reusable-workflows/.github/workflows/java-maven-app-version.yml@main
# with:
# working_directory: "src/${{ github.event.inputs.app_name }}"

app-version:
name: Get the app-version from the POM file
runs-on: ubuntu-latest
defaults:
run:
working-directory: "."
outputs:
app-version: ${{ steps.step1.outputs.version }}
app-version: ${{ steps.get-app-version.outputs.version }}

steps:
- uses: actions/checkout@v2

- name: Build Vips Client
working-directory: "./src/libs"
run: git submodule update --init

- name: "Set up JDK 17"
uses: actions/setup-java@v2
with:
Expand All @@ -69,12 +67,12 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Get Project Version
id: step1
id: get-app-version
working-directory: "./src"
run: |
_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -P${{ github.event.inputs.app_name }})
echo "version=$_version " >> "$GITHUB_OUTPUT"
echo $_version
echo $_version
build-and-push-image:
needs:
Expand Down

0 comments on commit b718d28

Please sign in to comment.