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 a0f636e commit b326c5c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ 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 @@ -44,7 +48,7 @@ jobs:

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

- name: Build Docker image
run: |
Expand Down

0 comments on commit b326c5c

Please sign in to comment.