Skip to content

Commit

Permalink
skip pushing to dockerhub when user and pass are not specified (facto…
Browse files Browse the repository at this point in the history
  • Loading branch information
perobertson authored Sep 25, 2021
1 parent 02cc66c commit 65e3f84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/docker-description.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker build & push
name: Docker Hub Description

on:
push:
Expand All @@ -13,6 +13,10 @@ jobs:
uses: actions/checkout@v2
- name: Docker Hub Description
uses: peter-evans/[email protected]
if: ${{ env.DOCKER_USERNAME != '' && env.DOCKER_PASSWORD != '' }}
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/docker_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: build
- name: build and push
if: ${{ env.DOCKER_USERNAME != '' && env.DOCKER_PASSWORD != '' }}
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
Expand Down

0 comments on commit 65e3f84

Please sign in to comment.