From 420aa124ca72ab87814089ab6d642d3b3230c8e0 Mon Sep 17 00:00:00 2001
From: nicktrn <55853254+nicktrn@users.noreply.github.com>
Date: Tue, 28 Apr 2026 15:08:23 +0100
Subject: [PATCH 1/4] ci(helm): roll prereleases on main pushes + manual
trigger
Renames helm-pr-prerelease.yml to helm-prerelease.yml. The workflow now
also runs on main pushes (paths: hosting/k8s/helm/**) so the chart
doesn't go stale between releases, and supports workflow_dispatch with
an optional appVersion override for manual builds.
Behavior:
- pull_request: -pr., posts/updates a PR comment as before
- push to main: -main., summary written to run page
- workflow_dispatch: -., optional appVersion override
---
...-pr-prerelease.yml => helm-prerelease.yml} | 58 +++++++++++++++++--
1 file changed, 52 insertions(+), 6 deletions(-)
rename .github/workflows/{helm-pr-prerelease.yml => helm-prerelease.yml} (63%)
diff --git a/.github/workflows/helm-pr-prerelease.yml b/.github/workflows/helm-prerelease.yml
similarity index 63%
rename from .github/workflows/helm-pr-prerelease.yml
rename to .github/workflows/helm-prerelease.yml
index f5bbfebde8..a94153c23b 100644
--- a/.github/workflows/helm-pr-prerelease.yml
+++ b/.github/workflows/helm-prerelease.yml
@@ -1,13 +1,25 @@
-name: 🧠Helm Chart PR Prerelease
+name: 🧠Helm Chart Prerelease
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "hosting/k8s/helm/**"
+ push:
+ branches:
+ - main
+ paths:
+ - "hosting/k8s/helm/**"
+ workflow_dispatch:
+ inputs:
+ app_version:
+ description: "Override appVersion (e.g. 'main', 'v4.4.4'). Leave empty to keep Chart.yaml value."
+ required: false
+ type: string
+ default: ""
concurrency:
- group: helm-prerelease-${{ github.event.pull_request.number }}
+ group: helm-prerelease-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
@@ -54,7 +66,10 @@ jobs:
prerelease:
needs: lint-and-test
- if: github.event.pull_request.head.repo.full_name == github.repository
+ if: |
+ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
+ github.event_name == 'push' ||
+ github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: read
@@ -88,9 +103,18 @@ jobs:
id: version
run: |
BASE_VERSION=$(grep '^version:' ./hosting/k8s/helm/Chart.yaml | awk '{print $2}')
- PR_NUMBER=${{ github.event.pull_request.number }}
- SHORT_SHA=$(echo "${{ github.event.pull_request.head.sha }}" | cut -c1-7)
- PRERELEASE_VERSION="${BASE_VERSION}-pr${PR_NUMBER}.${SHORT_SHA}"
+ if [[ "${{ github.event_name }}" == "pull_request" ]]; then
+ PR_NUMBER=${{ github.event.pull_request.number }}
+ SHORT_SHA=$(echo "${{ github.event.pull_request.head.sha }}" | cut -c1-7)
+ PRERELEASE_VERSION="${BASE_VERSION}-pr${PR_NUMBER}.${SHORT_SHA}"
+ elif [[ "${{ github.event_name }}" == "push" ]]; then
+ SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
+ PRERELEASE_VERSION="${BASE_VERSION}-main.${SHORT_SHA}"
+ else
+ SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
+ REF_SLUG=$(echo "${{ github.ref_name }}" | tr '/' '-' | tr -cd 'a-zA-Z0-9-')
+ PRERELEASE_VERSION="${BASE_VERSION}-${REF_SLUG}.${SHORT_SHA}"
+ fi
echo "version=$PRERELEASE_VERSION" >> $GITHUB_OUTPUT
echo "Prerelease version: $PRERELEASE_VERSION"
@@ -98,6 +122,11 @@ jobs:
run: |
sed -i "s/^version:.*/version: ${{ steps.version.outputs.version }}/" ./hosting/k8s/helm/Chart.yaml
+ - name: Override appVersion
+ if: github.event_name == 'workflow_dispatch' && inputs.app_version != ''
+ run: |
+ sed -i "s/^appVersion:.*/appVersion: ${{ inputs.app_version }}/" ./hosting/k8s/helm/Chart.yaml
+
- name: Package Helm Chart
run: |
helm package ./hosting/k8s/helm/ --destination /tmp/
@@ -110,7 +139,23 @@ jobs:
# Push to GHCR OCI registry
helm push "$CHART_PACKAGE" "oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts"
+ - name: Write run summary
+ run: |
+ {
+ echo "### 🧠Helm Chart Prerelease Published"
+ echo ""
+ echo "**Version:** \`${{ steps.version.outputs.version }}\`"
+ echo ""
+ echo "**Install:**"
+ echo '```bash'
+ echo "helm upgrade --install trigger \\"
+ echo " oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts/${{ env.CHART_NAME }} \\"
+ echo " --version \"${{ steps.version.outputs.version }}\""
+ echo '```'
+ } >> "$GITHUB_STEP_SUMMARY"
+
- name: Find existing comment
+ if: github.event_name == 'pull_request'
uses: peter-evans/find-comment@v3
id: find-comment
with:
@@ -119,6 +164,7 @@ jobs:
body-includes: "Helm Chart Prerelease Published"
- name: Create or update PR comment
+ if: github.event_name == 'pull_request'
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
From c44257dfb64b4f0991889ec326c89a60ac2d6561 Mon Sep 17 00:00:00 2001
From: nicktrn <55853254+nicktrn@users.noreply.github.com>
Date: Tue, 28 Apr 2026 15:13:28 +0100
Subject: [PATCH 2/4] chore(helm): add trailing newline to README to exercise
prerelease workflow
---
hosting/k8s/helm/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hosting/k8s/helm/README.md b/hosting/k8s/helm/README.md
index 4b54b52af7..33e64a93a2 100644
--- a/hosting/k8s/helm/README.md
+++ b/hosting/k8s/helm/README.md
@@ -736,4 +736,4 @@ helm upgrade --install trigger . \
- Documentation: https://trigger.dev/docs/self-hosting
- GitHub Issues: https://github.com/triggerdotdev/trigger.dev/issues
-- Discord: https://discord.gg/untWVke9aH
\ No newline at end of file
+- Discord: https://discord.gg/untWVke9aH
From 5a9ba0e733b75b77c115c8f193c65ff46505cecb Mon Sep 17 00:00:00 2001
From: nicktrn <55853254+nicktrn@users.noreply.github.com>
Date: Tue, 28 Apr 2026 15:27:54 +0100
Subject: [PATCH 3/4] ci(helm): harden manual dispatch + skip PR checks for
helm-only changes
- override appVersion via yq + env (no sed escape issues for user input)
- fall back REF_SLUG to 'manual' when sanitization strips it empty
- ignore helm prerelease workflow files in pr_checks.yml so unrelated
CI edits don't trigger the full typecheck/unit/e2e suite
---
.github/workflows/helm-prerelease.yml | 7 ++++++-
.github/workflows/pr_checks.yml | 2 ++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/helm-prerelease.yml b/.github/workflows/helm-prerelease.yml
index a94153c23b..9833519207 100644
--- a/.github/workflows/helm-prerelease.yml
+++ b/.github/workflows/helm-prerelease.yml
@@ -113,6 +113,9 @@ jobs:
else
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
REF_SLUG=$(echo "${{ github.ref_name }}" | tr '/' '-' | tr -cd 'a-zA-Z0-9-')
+ if [[ -z "$REF_SLUG" ]]; then
+ REF_SLUG="manual"
+ fi
PRERELEASE_VERSION="${BASE_VERSION}-${REF_SLUG}.${SHORT_SHA}"
fi
echo "version=$PRERELEASE_VERSION" >> $GITHUB_OUTPUT
@@ -124,8 +127,10 @@ jobs:
- name: Override appVersion
if: github.event_name == 'workflow_dispatch' && inputs.app_version != ''
+ env:
+ APP_VERSION: ${{ inputs.app_version }}
run: |
- sed -i "s/^appVersion:.*/appVersion: ${{ inputs.app_version }}/" ./hosting/k8s/helm/Chart.yaml
+ yq -i '.appVersion = strenv(APP_VERSION)' ./hosting/k8s/helm/Chart.yaml
- name: Package Helm Chart
run: |
diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml
index 12da89db3b..1c12710934 100644
--- a/.github/workflows/pr_checks.yml
+++ b/.github/workflows/pr_checks.yml
@@ -7,6 +7,8 @@ on:
- "docs/**"
- ".changeset/**"
- "hosting/**"
+ - ".github/workflows/helm-prerelease.yml"
+ - ".github/workflows/helm-pr-prerelease.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
From bcf28dcd0fd657ecfda3313089a691cb6202d31a Mon Sep 17 00:00:00 2001
From: nicktrn <55853254+nicktrn@users.noreply.github.com>
Date: Tue, 28 Apr 2026 15:35:23 +0100
Subject: [PATCH 4/4] ci: drop ignore for old helm-pr-prerelease.yml (deleted
in this PR)
---
.github/workflows/pr_checks.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml
index 1c12710934..be9009ae96 100644
--- a/.github/workflows/pr_checks.yml
+++ b/.github/workflows/pr_checks.yml
@@ -8,7 +8,6 @@ on:
- ".changeset/**"
- "hosting/**"
- ".github/workflows/helm-prerelease.yml"
- - ".github/workflows/helm-pr-prerelease.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}