Skip to content

Commit

Permalink
Build and publish docker images and helm chart through chartpress
Browse files Browse the repository at this point in the history
  • Loading branch information
sunu committed Sep 8, 2024
1 parent 8c294c6 commit e42bf18
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 44 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build-publish-docker-helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Publish Docker Images and Helm Chart

on:
workflow_dispatch:
push:
branches:
- main

jobs:
publish-charts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install chartpress
run: pip install chartpress

- name: Configure Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Run chartpress
run: |
chartpress --push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(cat helm/jupyter-home-nfs/Chart.yaml | grep version | awk '{print $2}')

- name: Package Helm Chart
run: |
helm package helm/jupyter-home-nfs -d .helm-charts
- name: Push Helm Chart
run: |
helm push .helm-charts/jupyter-home-nfs-${{ steps.get_version.outputs.VERSION }}.tgz oci://ghcr.io/sunu/jupyter-home-nfs
44 changes: 0 additions & 44 deletions .github/workflows/docker-build.yaml

This file was deleted.

0 comments on commit e42bf18

Please sign in to comment.