mirror of
https://github.com/henrygd/beszel.git
synced 2026-08-19 16:57:47 +02:00
helm: update version to latest and automate chart app version bumps
- Keep chart documentation aligned with the application version - Update app versions automatically after application releases - Restore the main application release as latest after chart publishing
This commit is contained in:
11
.github/workflows/release-please.yml
vendored
11
.github/workflows/release-please.yml
vendored
@@ -139,3 +139,14 @@ jobs:
|
|||||||
# Generate index.yaml for GitHub Pages
|
# 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 }}')
|
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[@]}"
|
.tmp/cr index "${args[@]}"
|
||||||
|
|
||||||
|
- name: Restore application release as latest
|
||||||
|
if: ${{ always() }}
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
release_id=$(gh api "repos/${GITHUB_REPOSITORY}/releases?per_page=100" \
|
||||||
|
--jq 'map(select(.draft == false and .prerelease == false and (.tag_name | test("^v[0-9]"))))[0].id')
|
||||||
|
test -n "$release_id"
|
||||||
|
gh api --method PATCH "repos/${GITHUB_REPOSITORY}/releases/${release_id}" \
|
||||||
|
-f make_latest=true
|
||||||
|
|||||||
48
.github/workflows/release.yml
vendored
48
.github/workflows/release.yml
vendored
@@ -52,3 +52,51 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.TOKEN || secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
WINGET_TOKEN: ${{ secrets.WINGET_TOKEN }}
|
WINGET_TOKEN: ${{ secrets.WINGET_TOKEN }}
|
||||||
IS_FORK: ${{ github.repository_owner != 'henrygd' }}
|
IS_FORK: ${{ github.repository_owner != 'henrygd' }}
|
||||||
|
|
||||||
|
update-helm-app-version:
|
||||||
|
name: Update Helm app version
|
||||||
|
needs: goreleaser
|
||||||
|
if: ${{ github.repository_owner == 'henrygd' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout main
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
token: ${{ secrets.CR_TOKEN }}
|
||||||
|
|
||||||
|
- name: Update chart app versions
|
||||||
|
env:
|
||||||
|
RELEASE_TAG: ${{ github.ref_name }}
|
||||||
|
run: |
|
||||||
|
version="${RELEASE_TAG#v}"
|
||||||
|
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.-]+)?$ ]]; then
|
||||||
|
echo "Invalid release version: $version" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for chart in supplemental/helm/beszel-agent supplemental/helm/beszel-hub; do
|
||||||
|
current_version=$(awk -F '"' '/^appVersion:/ { print $2 }' "$chart/Chart.yaml")
|
||||||
|
NEW_VERSION="$version" perl -pi -e 's/^appVersion:.*$/appVersion: "$ENV{NEW_VERSION}"/' "$chart/Chart.yaml"
|
||||||
|
OLD_VERSION="$current_version" NEW_VERSION="$version" \
|
||||||
|
perl -pi -e 's/\Q$ENV{OLD_VERSION}\E/$ENV{NEW_VERSION}/g' "$chart/README.md"
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Commit app version update
|
||||||
|
env:
|
||||||
|
RELEASE_TAG: ${{ github.ref_name }}
|
||||||
|
run: |
|
||||||
|
if git diff --quiet -- supplemental/helm; then
|
||||||
|
echo "Helm charts already use ${RELEASE_TAG#v}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add supplemental/helm/beszel-agent/Chart.yaml \
|
||||||
|
supplemental/helm/beszel-agent/README.md \
|
||||||
|
supplemental/helm/beszel-hub/Chart.yaml \
|
||||||
|
supplemental/helm/beszel-hub/README.md
|
||||||
|
git commit -m "fix(helm): update app version to ${RELEASE_TAG#v}"
|
||||||
|
git push origin HEAD:main
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
|||||||
description: Installs beszel-agent in kubernetes
|
description: Installs beszel-agent in kubernetes
|
||||||
home: https://github.com/henrygd/beszel/tree/main/supplemental/helm/beszel-agent
|
home: https://github.com/henrygd/beszel/tree/main/supplemental/helm/beszel-agent
|
||||||
name: beszel-agent
|
name: beszel-agent
|
||||||
appVersion: "0.17.0"
|
appVersion: "0.18.7"
|
||||||
# Managed automatically by Release Please; do not edit manually.
|
# Managed automatically by Release Please; do not edit manually.
|
||||||
version: 0.1.3
|
version: 0.1.3
|
||||||
sources:
|
sources:
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ Essential parameters to configure:
|
|||||||
| `secret.sshKey` | `ssh-key` | Key name in the secret for the SSH public key |
|
| `secret.sshKey` | `ssh-key` | Key name in the secret for the SSH public key |
|
||||||
| `secret.tokenKey` | `token` | Key name in the secret for the authentication token |
|
| `secret.tokenKey` | `token` | Key name in the secret for the authentication token |
|
||||||
| `image.repository` | `henrygd/beszel-agent` | Container image |
|
| `image.repository` | `henrygd/beszel-agent` | Container image |
|
||||||
| `image.tag` | Chart AppVersion (0.17.0) | Image version |
|
| `image.tag` | Chart AppVersion (0.18.7) | Image version |
|
||||||
| `hostNetwork` | `false` | Use host network for network monitoring |
|
| `hostNetwork` | `false` | Use host network for network monitoring |
|
||||||
| `tolerations` | Allows all taints | Tolerations for running on tainted nodes |
|
| `tolerations` | Allows all taints | Tolerations for running on tainted nodes |
|
||||||
|
|
||||||
@@ -392,7 +392,7 @@ helm upgrade beszel-agent ./beszel-agent \
|
|||||||
|
|
||||||
# Change image version
|
# Change image version
|
||||||
helm upgrade beszel-agent ./beszel-agent \
|
helm upgrade beszel-agent ./beszel-agent \
|
||||||
--set image.tag="0.17.0"
|
--set image.tag="0.18.7"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Restart All Agents
|
### Restart All Agents
|
||||||
@@ -529,7 +529,7 @@ kubectl get secret beszel-agent -o jsonpath='{.data.ssh-key}' | base64 -d
|
|||||||
## Chart Information
|
## Chart Information
|
||||||
|
|
||||||
- **Chart Version**: 0.1.0
|
- **Chart Version**: 0.1.0
|
||||||
- **App Version**: 0.17.0
|
- **App Version**: 0.18.7
|
||||||
- **Kubernetes Version**: 1.19+
|
- **Kubernetes Version**: 1.19+
|
||||||
- **Maintainer**: cloudwithdan (nikoloskid@pm.me)
|
- **Maintainer**: cloudwithdan (nikoloskid@pm.me)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
|||||||
description: Installs beszel-hub in kubernetes
|
description: Installs beszel-hub in kubernetes
|
||||||
home: https://github.com/henrygd/beszel/tree/main/supplemental/helm/beszel-hub
|
home: https://github.com/henrygd/beszel/tree/main/supplemental/helm/beszel-hub
|
||||||
name: beszel-hub
|
name: beszel-hub
|
||||||
appVersion: "0.17.0"
|
appVersion: "0.18.7"
|
||||||
# Managed automatically by Release Please; do not edit manually.
|
# Managed automatically by Release Please; do not edit manually.
|
||||||
version: 0.1.3
|
version: 0.1.3
|
||||||
sources:
|
sources:
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ Key configuration options in `values.yaml`:
|
|||||||
|-----------|---------|-------------|
|
|-----------|---------|-------------|
|
||||||
| `replicaCount` | `1` | Number of Beszel Hub replicas |
|
| `replicaCount` | `1` | Number of Beszel Hub replicas |
|
||||||
| `image.repository` | `henrygd/beszel` | Container image repository |
|
| `image.repository` | `henrygd/beszel` | Container image repository |
|
||||||
| `image.tag` | Chart AppVersion (0.17.0) | Container image tag |
|
| `image.tag` | Chart AppVersion (0.18.7) | Container image tag |
|
||||||
| `image.pullPolicy` | `IfNotPresent` | Image pull policy |
|
| `image.pullPolicy` | `IfNotPresent` | Image pull policy |
|
||||||
| `service.port` | `8090` | Service port |
|
| `service.port` | `8090` | Service port |
|
||||||
| `persistentVolumeClaim.enabled` | `true` | Enable persistent volume |
|
| `persistentVolumeClaim.enabled` | `true` | Enable persistent volume |
|
||||||
@@ -176,7 +176,7 @@ tolerations:
|
|||||||
```yaml
|
```yaml
|
||||||
replicaCount: 3
|
replicaCount: 3
|
||||||
image:
|
image:
|
||||||
tag: "0.17.0"
|
tag: "0.18.7"
|
||||||
service:
|
service:
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
ingress:
|
ingress:
|
||||||
@@ -337,7 +337,7 @@ By default, Beszel Hub uses a PersistentVolumeClaim for data storage. Ensure you
|
|||||||
## Chart Information
|
## Chart Information
|
||||||
|
|
||||||
- **Chart Version**: 0.1.0
|
- **Chart Version**: 0.1.0
|
||||||
- **App Version**: 0.17.0
|
- **App Version**: 0.18.7
|
||||||
- **Kubernetes Version**: 1.19+
|
- **Kubernetes Version**: 1.19+
|
||||||
- **Maintainer**: cloudwithdan (nikoloskid@pm.me)
|
- **Maintainer**: cloudwithdan (nikoloskid@pm.me)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user