Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Commit

Permalink
Skip Docker deployment if DOCKER_NAME is not set (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
fedgiac committed Feb 2, 2022
1 parent 1d7517d commit 24d63db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,18 @@ jobs:
needs: test
env:
DOCKERHUB_PROJECT: gp-v2-contracts
DOCKER_NAME: ${{ secrets.DOCKER_NAME }}
steps:
- uses: actions/checkout@v2
- name: Dockerhub login
uses: docker/login-action@v1
if: ${{ env.DOCKER_NAME != '' }}
with:
username: ${{ secrets.DOCKER_NAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Deploy Main
if: github.ref == 'refs/heads/main'
if: ${{ env.DOCKER_NAME != '' && github.ref == 'refs/heads/main' }}
run: bash src/docker/deploy.sh staging
- name: Deploy Tag
if: startsWith(github.ref, 'refs/tags/')
if: ${{ env.DOCKER_NAME != '' && startsWith(github.ref, 'refs/tags/') }}
run: bash src/docker/deploy.sh ${GITHUB_REF##*/}

0 comments on commit 24d63db

Please sign in to comment.