Skip to content

Commit

Permalink
chore: update CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
danishjoseph committed Jul 16, 2024
1 parent 457e65a commit 2449def
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'

- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install test dependencies
run: yarn install --production=false --only=dev

Expand All @@ -60,10 +50,14 @@ jobs:
- name: Install test dependencies
run: yarn install --production=false --only=dev

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

- name: Build Docker image
run: |
yarn nx run backend:docker-build --tag=${{ secrets.DOCKER_HUB_USERNAME }}/stockdog:v-${{ steps.version.outputs.VERSION }}
docker save ${{ secrets.DOCKER_HUB_USERNAME }}/stockdog:v-${{ steps.version.outputs.VERSION }} > docker_image.tar
yarn nx run backend:docker-build --tag=${{ secrets.DOCKER_HUB_USERNAME }}/stockdog:v-${{ env.VERSION }}
docker save ${{ secrets.DOCKER_HUB_USERNAME }}/stockdog:v-${{ env.VERSION }} > docker_image.tar
- name: Upload Docker image as artifact
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 2449def

Please sign in to comment.