forked from jupyterhub/zero-to-jupyterhub-k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include publish-chart.yml to build process
- Loading branch information
Showing
1 changed file
with
43 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
- "**.md" | ||
- ".github/workflows/*" | ||
- "!.github/workflows/publish.yaml" | ||
- "!.github/workflows/publish-chart.yml" | ||
branches-ignore: | ||
- "dependabot/**" | ||
- "pre-commit-ci-update-config" | ||
|
@@ -24,7 +25,7 @@ env: | |
jobs: | ||
release: | ||
# this job will only run if the PR has been merged | ||
if: github.event.client_payload.action == 'chart-release' || github.event.client_payload.action == 'chart-and-app-release' | ||
#if: github.event.client_payload.action == 'chart-release' || github.event.client_payload.action == 'chart-and-app-release' | ||
permissions: | ||
# contents: write # for peter-evans/repository-dispatch to create a repository dispatch event | ||
packages: write # to push OCI chart package to GitHub Registry | ||
|
@@ -41,47 +42,47 @@ jobs: | |
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.10 | ||
# - name: Setup Chart Linting | ||
# id: lint | ||
# uses: helm/chart-testing-action@v2 | ||
# - name: Setup Kubernetes cluster (KIND) | ||
# uses: helm/[email protected] # v1.5.0 | ||
# with: | ||
# version: ${{ env.KIND_VERSION }} | ||
# node_image: ${{ env.KIND_IMAGE }} | ||
# - name: Run chart-testing | ||
# run: ct lint-and-install --validate-maintainers=false --charts deploy/helm | ||
- name: Install chart-releaser | ||
run: | | ||
wget https://github.com/helm/chart-releaser/releases/download/v1.6.1/chart-releaser_1.6.1_linux_amd64.tar.gz | ||
echo "d4a2ffa825ff1b60a1cce819ce87eec337cf16059ca3d8a053e20cac39cf9e0a chart-releaser_1.6.1_linux_amd64.tar.gz" | sha256sum -c - | ||
tar xzvf chart-releaser_1.6.1_linux_amd64.tar.gz cr | ||
- name: Install chart publishing dependencies (chartpress, helm) | ||
run: | | ||
pip install chartpress pyyaml | ||
- name: Package helm chart | ||
run: | | ||
chartpress --no-build | ||
./cr package ${{ env.CHART_DIR }} | ||
# OCI registry as helm repository (helm 3.8+) | ||
- name: Login to GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push chart to GHCR | ||
run: | | ||
shopt -s nullglob | ||
for pkg in ${{ env.CR_PACKAGE_PATH }}/*.tgz; do | ||
if [ -z "${pkg:-}" ]; then | ||
break | ||
fi | ||
helm push "${pkg}" oci://${{ env.REGISTRY }}/${{ env.GH_OWNER }}/${{ env.HELM_REP }} | ||
done | ||
# - name: Setup Chart Linting | ||
# id: lint | ||
# uses: helm/chart-testing-action@v2 | ||
# - name: Setup Kubernetes cluster (KIND) | ||
# uses: helm/[email protected] # v1.5.0 | ||
# with: | ||
# version: ${{ env.KIND_VERSION }} | ||
# node_image: ${{ env.KIND_IMAGE }} | ||
# - name: Run chart-testing | ||
# run: ct lint-and-install --validate-maintainers=false --charts deploy/helm | ||
# - name: Install chart-releaser | ||
# run: | | ||
# wget https://github.com/helm/chart-releaser/releases/download/v1.6.1/chart-releaser_1.6.1_linux_amd64.tar.gz | ||
# echo "d4a2ffa825ff1b60a1cce819ce87eec337cf16059ca3d8a053e20cac39cf9e0a chart-releaser_1.6.1_linux_amd64.tar.gz" | sha256sum -c - | ||
# tar xzvf chart-releaser_1.6.1_linux_amd64.tar.gz cr | ||
# - name: Install chart publishing dependencies (chartpress, helm) | ||
# run: | | ||
# pip install chartpress pyyaml | ||
# | ||
# - name: Package helm chart | ||
# run: | | ||
# chartpress --no-build | ||
# ./cr package ${{ env.CHART_DIR }} | ||
# | ||
# # OCI registry as helm repository (helm 3.8+) | ||
# - name: Login to GHCR | ||
# uses: docker/login-action@v3 | ||
# with: | ||
# registry: ghcr.io | ||
# username: ${{ github.actor }} | ||
# password: ${{ secrets.GITHUB_TOKEN }} | ||
# | ||
# - name: Push chart to GHCR | ||
# run: | | ||
# shopt -s nullglob | ||
# for pkg in ${{ env.CR_PACKAGE_PATH }}/*.tgz; do | ||
# if [ -z "${pkg:-}" ]; then | ||
# break | ||
# fi | ||
# helm push "${pkg}" oci://${{ env.REGISTRY }}/${{ env.GH_OWNER }}/${{ env.HELM_REP }} | ||
# done | ||
|
||
# - name: Get latest tag | ||
# id: latest_tag | ||
|