From 88e232412d9fe5186a5a950cc73b40b3b0bdde91 Mon Sep 17 00:00:00 2001 From: Danish Joseph Date: Wed, 24 Apr 2024 12:22:12 +0200 Subject: [PATCH] Update CI workflow to include getting version number from package.json --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 973ff15..382e3cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,14 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + + - name: Get version number + id: version + run: echo "VERSION= $(cat ./package.json | jq -r '.version')" >> $GITHUB_ENV + + - name: Get version number + id: version + run: echo "cat ./package.json | jq -r '.version')" - name: Install test dependencies run: yarn install --production=false --only=dev @@ -36,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 build-and-push: name: Build & push to DockerHub