diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 45351cb2..5df8a469 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -38,10 +38,25 @@ jobs: id: tag env: DEFAULT_BUMP: patch - GITHUB_TOKEN: ${{ secrets.BROADBOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.BROADBOT_TOKEN }} # this allows the push to succeed later RELEASE_BRANCHES: develop WITH_V: true + - name: Construct dockerhub and GCR image names + id: image-name + run: | + echo ::set-output name=DOCKERHUB_NAME::broadinstitute/agora:${{ steps.tag.outputs.new_tag }} + echo ::set-output name=GCR_NAME::gcr.io/broad-dsp-gcr-public/agora:${{ steps.tag.outputs.new_tag }} + - name: Build image run: | - docker build -t agora:${{ steps.tag.outputs.new_tag }} . + docker build -t ${{ steps.image-name.outputs.DOCKERHUB_NAME }} . + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: dsdejenkins + password: ${{ secrets.DSDEJENKINS_DOCKERHUB_PASSWORD }} + + - name: Push dockerhub image + run: docker push ${{ steps.image-name.outputs.DOCKERHUB_NAME }}