Skip to content

Lightweight server monitoring with historical data, docker stats, and alerts.

fix(helm): publish and index chart releases reliably, maybe

henrygd55054a75aba2
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
index e2e4965c6..efe9ee87c 100644
--- a/.github/workflows/release-please.yml
+++ b/.github/workflows/release-please.yml
@@ -18,6 +18,10 @@ env:
name: helm-release
+concurrency:
+ group: helm-release
+ cancel-in-progress: false
+
jobs:
release:
name: Release
@@ -73,6 +77,7 @@ jobs:
env:
TAG: ${{ fromJson(needs.release.outputs.releases)[format('{0}--tag_name', matrix.path)] }}
VERSION: ${{ fromJson(needs.release.outputs.releases)[format('{0}--version', matrix.path)] }}
+ RELEASE_ID: ${{ fromJson(needs.release.outputs.releases)[format('{0}--id', matrix.path)] }}
steps:
- name: Debug
@@ -112,27 +117,25 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload "$TAG" .cr-release-packages/*.tgz --clobber
- - name: Update index
- run: |
- owner=$(cut -d '/' -f 1 <<< "$GITHUB_REPOSITORY")
- repo=$(cut -d '/' -f 2 <<< "$GITHUB_REPOSITORY")
-
- # Create docs directory and copy chart
- mkdir -p docs
- cp .cr-release-packages/*.tgz docs/ || true
-
- # Generate index.yaml for GitHub Pages
- args=(-o "$owner" -r "$repo" -c "https://henrygd.github.io/beszel" --push -t "${{ secrets.CR_TOKEN }}" --index-path docs/index.yaml)
- .tmp/cr index "${args[@]}"
-
- name: Publish chart release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHART_PATH: ${{ matrix.path }}
run: |
chart_name="${CHART_PATH##*/}"
- release_id=$(gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${TAG}" --jq .id)
- gh api --method PATCH "repos/${GITHUB_REPOSITORY}/releases/${release_id}" \
+ gh api --method PATCH "repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}" \
-f "name=Helm chart: ${chart_name} v${VERSION}" \
-F draft=false \
-f make_latest=false
+
+ - name: Update index
+ run: |
+ owner=$(cut -d '/' -f 1 <<< "$GITHUB_REPOSITORY")
+ repo=$(cut -d '/' -f 2 <<< "$GITHUB_REPOSITORY")
+
+ # Create the local output directory for the generated index
+ mkdir -p docs
+
+ # Generate index.yaml for GitHub Pages
+ args=(-o "$owner" -r "$repo" --push -t "${{ secrets.CR_TOKEN }}" --index-path docs/index.yaml --release-name-template '{{ .Name }}-v{{ .Version }}')
+ .tmp/cr index "${args[@]}"
diff --git a/supplemental/helm/beszel-agent/Chart.yaml b/supplemental/helm/beszel-agent/Chart.yaml
index d6ef9133b..1adf115d9 100644
--- a/supplemental/helm/beszel-agent/Chart.yaml
+++ b/supplemental/helm/beszel-agent/Chart.yaml
@@ -3,7 +3,7 @@ description: Installs beszel-agent in kubernetes
home: https://github.com/henrygd/beszel/tree/main/supplemental/helm/beszel-agent
name: beszel-agent
appVersion: "0.17.0"
-# This version is managed automatically by Release Please.
+# Managed automatically by Release Please; do not edit manually.
version: 0.1.2
sources:
- https://github.com/henrygd/beszel/tree/main/supplemental/helm/beszel-agent
diff --git a/supplemental/helm/beszel-hub/Chart.yaml b/supplemental/helm/beszel-hub/Chart.yaml
index ccbca0da0..08d870b4b 100644
--- a/supplemental/helm/beszel-hub/Chart.yaml
+++ b/supplemental/helm/beszel-hub/Chart.yaml
@@ -3,7 +3,7 @@ description: Installs beszel-hub in kubernetes
home: https://github.com/henrygd/beszel/tree/main/supplemental/helm/beszel-hub
name: beszel-hub
appVersion: "0.17.0"
-# This version is managed automatically by Release Please.
+# Managed automatically by Release Please; do not edit manually.
version: 0.1.2
sources:
- https://github.com/henrygd/beszel/tree/main/supplemental/helm/beszel-hub