Skip to content

Commit

Permalink
fix: docker image publish to dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
danishjoseph committed Jul 16, 2024
1 parent ca5c407 commit 6a9b17a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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_OUTPUT

- name: Build Docker image
run: |
Expand All @@ -68,7 +68,7 @@ jobs:
name: Push Docker image to DockerHub
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Download Docker image
uses: actions/download-artifact@v3
Expand All @@ -85,4 +85,4 @@ jobs:
password: ${{ secrets.DOCKER_HUB_TOKEN }}

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

0 comments on commit 6a9b17a

Please sign in to comment.