Skip to content

Commit

Permalink
fix: only do a Docker Login if the secrets are available
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Harrison committed Feb 7, 2022
1 parent 0c491ce commit a136110
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ jobs:
node: [ 6, 7, 8, 10, lts ]
env:
version: ${{ matrix.node }}
DOCKER_LOGIN: ${{ secrets.DOCKER_USERNAME && secrets.DOCKER_AUTH_TOKEN }}
steps:
- name: Checkout sendgrid-nodejs
uses: actions/checkout@v2

- name: Login to Docker Hub
if: env.DOCKER_LOGIN
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down

0 comments on commit a136110

Please sign in to comment.