Skip to content

Commit bf3fa94

Browse files
Merge pull request #2 from GeorgianaElena/setup-chartpress
Setup chartpress
2 parents 1d81add + 253d9a7 commit bf3fa94

3 files changed

Lines changed: 87 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Publish helm chart
2+
3+
# Trigger the workflow on pushed tags or commits to main branch.
4+
on:
5+
workflow_dispatch:
6+
push:
7+
paths-ignore:
8+
- "docs/**"
9+
- "**.md"
10+
- ".github/workflows/*"
11+
- "!.github/workflows/publish-helm-chart.yaml"
12+
branches:
13+
- "main"
14+
tags:
15+
- "**"
16+
17+
jobs:
18+
# Packages the Helm chart, and pushes it to 2i2c-org/jupyterhub-cost-monitoring@gh-pages.
19+
#
20+
publish:
21+
runs-on: ubuntu-22.04
22+
23+
# Explicitly request permissions to push to this git repository's gh-pages
24+
# branch via the the GITHUB_TOKEN we can have access to.
25+
permissions:
26+
contents: write
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
# chartpress needs git history
32+
fetch-depth: 0
33+
34+
- uses: actions/setup-python@v5
35+
with:
36+
python-version: "3.x"
37+
38+
- name: Login to Quay.io
39+
uses: docker/login-action@v3
40+
with:
41+
registry: quay.io
42+
username: ${{ secrets.QUAY_USERNAME }}
43+
password: ${{ secrets.QUAY_PASSWORD }}
44+
45+
- name: Configure a git user
46+
run: |
47+
git config --global user.email "github-actions@github.com"
48+
git config --global user.name "github-actions"
49+
50+
- name: Install dependencies
51+
run: |
52+
pip install -r dev-requirements.txt
53+
pip list
54+
helm version
55+
56+
- name: Run chartpress
57+
run: chartpress --push --publish-chart
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

chartpress.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This is the configuration for chartpress, a CLI for Helm chart management.
2+
#
3+
# chartpress is used to:
4+
# - Build images
5+
# - Update Chart.yaml (version) and values.yaml (image tags)
6+
# - Package and publish Helm charts to a GitHub based Helm chart repository
7+
#
8+
# For more information, see the projects README.md file:
9+
# https://github.com/jupyterhub/chartpress
10+
#
11+
12+
charts:
13+
- name: jupyterhub-cost-monitoring
14+
chartPath: helm/jupyterhub-cost-monitoring
15+
imagePrefix: quay.io/2i2c/
16+
# Set dev version by taking latest tag and incrementing patch
17+
baseVersion: patch
18+
19+
repo:
20+
git: 2i2c-org/jupyterhub-cost-monitoring
21+
published: https://2i2c.org/jupyterhub-cost-monitoring/
22+
23+
images:
24+
jupyterhub-cost-monitoring:
25+
dockerfilePath: Dockerfile
26+
contextPath: .
27+
valuesPath: image

dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
chartpress

0 commit comments

Comments
 (0)