Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wolwerr authored Aug 17, 2024
1 parent 7c41f40 commit bde1d71
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit bde1d71

Please sign in to comment.