Skip to content

Commit a136110

Browse files
author
Sam Harrison
committed
fix: only do a Docker Login if the secrets are available
1 parent 0c491ce commit a136110

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/test-and-deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ jobs:
2020
node: [ 6, 7, 8, 10, lts ]
2121
env:
2222
version: ${{ matrix.node }}
23+
DOCKER_LOGIN: ${{ secrets.DOCKER_USERNAME && secrets.DOCKER_AUTH_TOKEN }}
2324
steps:
2425
- name: Checkout sendgrid-nodejs
2526
uses: actions/checkout@v2
2627

2728
- name: Login to Docker Hub
29+
if: env.DOCKER_LOGIN
2830
uses: docker/login-action@v1
2931
with:
3032
username: ${{ secrets.DOCKER_USERNAME }}

0 commit comments

Comments
 (0)