Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DH-301] point the build and push cannon to artifact registry #2

Merged
merged 13 commits into from
Jun 7, 2024
15 changes: 8 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest
env:
DOCKER_CONFIG: $HOME/.docker

steps:

# For biggish images, github actions runs out of disk space.
Expand All @@ -26,25 +29,23 @@ jobs:
- name: Checkout files in repo
uses: actions/checkout@main

- name: Build the image and push to quay.io if not a pull request
- name: Build the image and push to artifact registry if not a pull request
uses: jupyterhub/repo2docker-action@master
with:
# Don't push the image during a PR build
NO_PUSH: "${{ github.event_name == 'pull_request' }}"
# Make sure username & password/token pair matches your registry credentials
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
DOCKER_REGISTRY: "quay.io"
DOCKER_USERNAME: _json_key
DOCKER_PASSWORD: $ {{ secrets.GAR_SECRET_KEY }}
DOCKER_REGISTRY: us-central1-docker.pkg.dev
IMAGE_NAME: ucb-datahub-2018/user-images/logodev-user-image
# Disable pushing a 'latest' tag, as this often just causes confusion
LATEST_TAG_OFF: true
# Put repo contents in /srv/repo, rather than the default (/home/jovyan). The home directory
# is mounted over by persistent storage when we are using the built image in a JupyterHub, and
# so all contents put in /home/jovyan are lost. This particularly prevents any 'start' script from
# working, as it is needed in runtime.
REPO_DIR: /srv/repo
#
# Uncomment and modify the following line with your image name, otherwise no push will happen
# IMAGE_NAME: "<quay-username>/<repository-name>"

# Lets us monitor disks getting full as images get bigger over time
- name: Show how much disk space is left
Expand Down