Skip to content

Commit

Permalink
💚 fix extract project version
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-bouali committed Apr 7, 2024
1 parent 5db8120 commit 526cb22
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/pipeline-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,26 @@ jobs:
needs: [build]
steps:
- name: Extract project version
id: extract-version
id: extract_version
run: |
cd book-network
echo "PROJECT_VERSION=$(./mvnw -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec) >> $GITHUB_OUTPUT"
echo "Project version:: ${{ steps.extract-version.outputs.PROJECT_VERSION }}"
echo "VERSION=$(./mvnw -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec) >> $GITHUB_OUTPUT"
echo "Project version:: ${{ steps.extract_version.outputs.VERSION }}"
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build & Push to DockerHub
uses: docker/build-push-action@v5
with:
context: book-network
dockerfile: docker/backend/Dockerfile
file: docker/backend/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/bsn:${{ steps.extract-version.outputs.PROJECT_VERSION }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/bsn:${{ steps.extract_version.outputs.VERSION }}
build-args: |
PROFILE: dev
APP_VERSION: ${{ steps.extract-version.outputs.PROJECT_VERSION }}
APP_VERSION: ${{ steps.extract_version.outputs.VERSION }}

0 comments on commit 526cb22

Please sign in to comment.