Skip to content

Commit

Permalink
on PRs, build image but do not push (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcranston committed Jan 27, 2021
1 parent 86652f6 commit f546c4e
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/build-only.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Builds any changed docker images and pushes to Dockerhub
# Only runs for PRs; does not re-deploy
# Builds any changed docker images
# Only runs for PRs; does not push to Dockerhub or re-deploy
#
# The bulk of this workflow happens in the deploy.py script

name: Build, push Docker image
name: Build Docker image

on:
pull_request:
Expand All @@ -14,15 +14,14 @@ on:

env:
PYTHON_VERSION: 3.8
DOCKERHUB_USERNAME: earthlabcu
GKE_PROJECT: ea-jupyter
GKE_ZONE: us-central1-b
GKE_CLUSTER: jhub2


jobs:

build-push:
build-image:
runs-on: ubuntu-latest

strategy:
Expand All @@ -38,11 +37,5 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build the Docker image
run: python deploy.py --build --push ${{matrix.hubname}}
run: python deploy.py --build ${{matrix.hubname}}

0 comments on commit f546c4e

Please sign in to comment.