-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (44 loc) · 1.33 KB
/
build-publish-docker-helm.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build and Publish Docker Images and Helm Chart
on:
workflow_dispatch:
push:
branches:
- main
tags:
- '**'
permissions:
packages: write
jobs:
publish-charts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- 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
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(cat helm/jupyterhub-home-nfs/Chart.yaml | grep version | awk '{print $2}')
- name: Package Helm Chart
run: |
helm package helm/jupyterhub-home-nfs -d .helm-charts
- name: Push Helm Chart
run: |
helm push .helm-charts/jupyterhub-home-nfs-${{ steps.get_version.outputs.VERSION }}.tgz oci://ghcr.io/2i2c-org/jupyterhub-home-nfs