From bde1d715a3e36bc5bd7b3e9f5ca9c49174be50ad Mon Sep 17 00:00:00 2001 From: Ricardo Machado Date: Fri, 16 Aug 2024 23:02:16 -0300 Subject: [PATCH] Update docker-image.yml --- .github/workflows/docker-image.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index ef08062..23f43a5 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,14 +15,12 @@ jobs: with: fetch-depth: 0 - # Step to check and create the VERSION file if it does not exist - name: Check and create VERSION file run: | if [ ! -f VERSION ]; then echo "1.0.0" > VERSION fi - # Step to read and increment the version from a file - name: Increment version id: increment_version run: | @@ -34,13 +32,8 @@ jobs: new_patch=$((patch + 1)) new_version="$major.$minor.$new_patch" echo "New version: $new_version" - echo "new_version=$new_version" >> $GITHUB_ENV echo $new_version > VERSION - env: - new_version: ${{ steps.increment_version.outputs.new_version }} - - outputs: - new_version: ${{ steps.increment_version.outputs.new_version }} + echo "::set-output name=new_version::$new_version" - name: Set up JDK 21 uses: actions/setup-java@v3 @@ -58,6 +51,9 @@ jobs: - name: Build with Maven run: mvn -B package --file pom.xml + outputs: + new_version: ${{ steps.increment_version.outputs.new_version }} + test: needs: build runs-on: ubuntu-latest