ci: login to DockerHub if secrets are available
@@ -31,6 +31,12 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
+ - name: Login to Docker Hub
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+ if: ${{ secrets.DOCKERHUB_USERNAME && secrets.DOCKERHUB_TOKEN }}
- name: Run with Docker
shell: 'script -q -e -c "bash -xe {0}"'
