Skip to content

Commit

Permalink
point the build and push cannon to artifact registry
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneknapp committed Jun 6, 2024
1 parent 497c7c1 commit d3235be
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 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,28 @@ jobs:
- name: Checkout files in repo
uses: actions/checkout@main

- name: log in to GAR
uses: docker/login-action@v3
with:
registry: us-central1-docker.pkg.dev
username: _json_key
password: ${{ secrets.GAR_SECRET_KEY }}

- name: Build the image and push to quay.io 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_REGISTRY: us-central1-docker.pkg.dev
IMAGE_NAME: ${{{ secrets.GCP_PROJECT_ID }}/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

0 comments on commit d3235be

Please sign in to comment.