Skip to content

Commit

Permalink
Update CI workflow to include getting version number from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
danishjoseph committed Apr 24, 2024
1 parent b326c5c commit 03e89a0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ jobs:

- name: Run Unit tests
run: yarn test --colors

- name: Get version number
id: version
run: echo "VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV

build-and-push:
name: Build & push to DockerHub
Expand All @@ -48,7 +44,7 @@ jobs:

- name: Get version number
id: version
run: echo "VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV
run: echo "VERSION=$(cat ./package.json | jq -r '.version')" >> $GITHUB_ENV

- name: Build Docker image
run: |
Expand All @@ -62,4 +58,3 @@ jobs:

- name: Push Docker image
run: docker push ${{ secrets.DOCKER_HUB_USERNAME }}/stockdog:v-${{ steps.version.outputs.version }}

0 comments on commit 03e89a0

Please sign in to comment.