Skip to content

Commit

Permalink
conditionalize pushing images to docker hub
Browse files Browse the repository at this point in the history
  • Loading branch information
Chethan-rao committed Nov 21, 2023
1 parent 5d3817e commit 0dd27bb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build-and-push-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,20 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push router Docker image
- name: Build and push Docker images tagged with both latest and above determined tag
uses: docker/build-push-action@v5
if: ${{ github.event_name == 'push' }}
with:
context: .
file: Dockerfile
push: true
tags: juspaydotin/hyperswitch-card-vault:latest,juspaydotin/hyperswitch-card-vault:${{ env.DOCKER_TAG }}

- name: Build and push Docker image tagged only with above determined tag
uses: docker/build-push-action@v5
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
context: .
file: Dockerfile
push: true
tags: juspaydotin/hyperswitch-card-vault:${{ env.DOCKER_TAG }}

0 comments on commit 0dd27bb

Please sign in to comment.