diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7176d18f8..87ae7c333 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -23,9 +23,9 @@ jobs: - name: List of all Github Actions env vars run: env - name: Build the Docker image - run: make -C docker ${{ matrix.docker-image }} REPO="${{ github.repository }}" BRANCH="${{ github.head_ref }}" + run: make -C docker ${{ matrix.docker-image }} REPO=${{ github.repository }} BRANCH=${{ github.head_ref || github.ref_name }} - name: Push to Docker Hub on Pushes to master run: | docker login -u gerbil -p ${{ secrets.DOCKER_TOKEN }} docker push gerbil/${{ matrix.docker-image }}:$(uname -m) - if: github.event_name != 'pull_request' + if: github.event_name == 'push'