Skip to content

Commit

Permalink
Compute version
Browse files Browse the repository at this point in the history
  • Loading branch information
ak-git committed Oct 2, 2024
1 parent fdc8124 commit b2f3316
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ jobs:
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: gradle build jacocoAggregatedReport sonar --info

- name: Compute version
id: compute_version
run: |
echo "::set-output name=version::$(./gradlew version | grep Version | awk '{ print $2 }')"
echo "${{ steps.compute_version.outputs.version }}"
run: echo "BUILD_VERSION=$(gradle version | grep Version | awk '{ print $2 }')" >> GITHUB_OUTPUT
- name: Get version
env:
SELECTED_VERSION: ${{ steps.compute_version.outputs.BUILD_VERSION }}
run: echo "The selected color is $SELECTED_VERSION"

- name: Login to Docker Hub
run: docker login -u $DOCKER_USER -p ${{ secrets.DOCKER_PASSWORD }}
- name: Build and tag the Docker image
Expand Down

0 comments on commit b2f3316

Please sign in to comment.