Skip to content

Commit

Permalink
helm charts and docker images are built on any push, but pushed to re…
Browse files Browse the repository at this point in the history
…po/registry for dev and release branches only
  • Loading branch information
tgreenwood committed Apr 5, 2024
1 parent 791b7dc commit 5aeac88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build_and_upload_docker_image_on_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Build & Upload Fairspace-Jupyter Docker image

on:
push:
branches:
- dev
- release

jobs:
build-and-upload-jupyterhub:
Expand Down Expand Up @@ -43,7 +40,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: ./projects/jupyterhub-hub/
push: true
push: ${{github.ref == 'refs/heads/release' || github.ref == 'refs/heads/dev'}}
tags: ${{ vars.DOCKER_REGISTRY }}/${{ github.repository }}/jupyterhub-hub:${{ env.VERSION }}
labels: ${{ steps.meta.outputs.labels }}

Expand Down Expand Up @@ -83,6 +80,6 @@ jobs:
uses: docker/build-push-action@v5
with:
context: ./projects/jupyterhub-singleuser/
push: true
push: ${{github.ref == 'refs/heads/release' || github.ref == 'refs/heads/dev'}}
tags: ${{ vars.DOCKER_REGISTRY }}/${{ github.repository }}/jupyterhub-singleuser:${{ env.VERSION }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 1 addition & 3 deletions .github/workflows/package_and_push_helm_chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Package and Push Helm Chart

on:
push:
branches:
- dev
- release
workflow_dispatch:
inputs:
version:
Expand Down Expand Up @@ -57,5 +54,6 @@ jobs:
helm package "charts/jupyter" --version ${{ env.VERSION }}
- name: Push Helm chart to repository
if: github.ref == 'refs/heads/release' || github.ref == 'refs/heads/dev'
run: |
helm push "fairspace-jupyter-${{ env.VERSION }}.tgz" "oci://${{ vars.HELM_REGISTRY }}"

0 comments on commit 5aeac88

Please sign in to comment.