diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index de3c053c9..74542b3d2 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -38,6 +38,14 @@ jobs: # password: ${{ secrets.DOCKERHUB_TOKEN }} # compose_file: docker-compose.yml + - name: Login to Docker Hub + if: ${{ steps.extract_branch.outputs.branch == 'master' }} + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # before cache # needed to avoid ccache injected into these images - name: Build Dev @@ -58,13 +66,6 @@ jobs: run: | docker-compose --profile dev --profile local push - - name: Login to Docker Hub - if: ${{ steps.extract_branch.outputs.branch == 'master' }} - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Cache uses: actions/cache@v2 with: