Skip to content

Commit

Permalink
Push images to Docker Hub as well, esp useful since K8S/containerd
Browse files Browse the repository at this point in the history
can't pull from Github Packages as per containerd/containerd#3291

Could have opted for making the GCR registry used for the Cloud Run
deployment public but that would incur cost for egress traffic...
  • Loading branch information
chids committed Apr 20, 2020
1 parent 0824e1c commit 3df6e9d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/maven-master-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ jobs:
restore-keys: ${{ runner.os }}-m2
- name: Build and test
run: mvn verify
- name: Publish image
- name: Publish image to Github Package Registry
run: mvn jib:build -Djib.to.image=docker.pkg.github.com/${GITHUB_REPOSITORY}/${PACKAGE} -Djib.to.auth.username=${GITHUB_ACTOR} -Djib.to.auth.password=${GITHUB_TOKEN} -Djib.to.image.tags=latest,${GITHUB_SHA}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish image to Docker Hub
run: mvn jib:build -Djib.to.image=docker.io/martengustafson/${PACKAGE} -Djib.to.auth.username=${DOCKER_HUB_USERNAME} -Djib.to.auth.password=${DOCKER_HUB_PASSWORD} -Djib.to.image.tags=latest,${GITHUB_SHA}
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}

0 comments on commit 3df6e9d

Please sign in to comment.