Skip to content

Commit b184cf5

Browse files
fix(ci): lowercase repo owner before using in OCI chart refs
GovSignals/trigger.dev's prerelease push was failing with: Error: invalid reference: invalid repository "GovSignals/charts/trigger" OCI references must be all-lowercase. `github.repository_owner` returns the org name as-cased (`GovSignals`), so the push URL was malformed. Add a tiny `Resolve repo owner (lowercase)` step that outputs `lc` and swap every chart-OCI reference (`oci://ghcr.io/<owner>/charts/...`) to use it. Same fix in both helm-prerelease.yml and release-helm.yml since the bug exists symmetrically — the release workflow just hadn't fired yet. This keeps the workflows portable: any GovSignals fork (or upstream fork) that copies these files renders correct lowercase OCI paths regardless of the org's display casing. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 1767835 commit b184cf5

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/helm-prerelease.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ jobs:
7979
- name: Checkout
8080
uses: actions/checkout@v4
8181

82+
- name: Resolve repo owner (lowercase)
83+
id: owner
84+
run: |
85+
OWNER="${{ github.repository_owner }}"
86+
echo "lc=${OWNER,,}" >> "$GITHUB_OUTPUT"
87+
8288
- name: Set up Helm
8389
uses: azure/setup-helm@v4
8490
with:
@@ -142,7 +148,7 @@ jobs:
142148
CHART_PACKAGE="/tmp/${{ env.CHART_NAME }}-${VERSION}.tgz"
143149
144150
# Push to GHCR OCI registry
145-
helm push "$CHART_PACKAGE" "oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts"
151+
helm push "$CHART_PACKAGE" "oci://${{ env.REGISTRY }}/${{ steps.owner.outputs.lc }}/charts"
146152
147153
- name: Write run summary
148154
run: |
@@ -154,7 +160,7 @@ jobs:
154160
echo "**Install:**"
155161
echo '```bash'
156162
echo "helm upgrade --install trigger \\"
157-
echo " oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts/${{ env.CHART_NAME }} \\"
163+
echo " oci://${{ env.REGISTRY }}/${{ steps.owner.outputs.lc }}/charts/${{ env.CHART_NAME }} \\"
158164
echo " --version \"${{ steps.version.outputs.version }}\""
159165
echo '```'
160166
} >> "$GITHUB_STEP_SUMMARY"
@@ -182,7 +188,7 @@ jobs:
182188
**Install:**
183189
```bash
184190
helm upgrade --install trigger \
185-
oci://ghcr.io/${{ github.repository_owner }}/charts/trigger \
191+
oci://ghcr.io/${{ steps.owner.outputs.lc }}/charts/trigger \
186192
--version "${{ steps.version.outputs.version }}"
187193
```
188194

.github/workflows/release-helm.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ jobs:
6969
- name: Checkout
7070
uses: actions/checkout@v4
7171

72+
- name: Resolve repo owner (lowercase)
73+
id: owner
74+
run: |
75+
OWNER="${{ github.repository_owner }}"
76+
echo "lc=${OWNER,,}" >> "$GITHUB_OUTPUT"
77+
7278
- name: Set up Helm
7379
uses: azure/setup-helm@v4
7480
with:
@@ -123,7 +129,7 @@ jobs:
123129
CHART_PACKAGE="/tmp/${{ env.CHART_NAME }}-${VERSION}.tgz"
124130
125131
# Push to GHCR OCI registry
126-
helm push "$CHART_PACKAGE" "oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts"
132+
helm push "$CHART_PACKAGE" "oci://${{ env.REGISTRY }}/${{ steps.owner.outputs.lc }}/charts"
127133
128134
- name: Create GitHub Release
129135
id: release
@@ -135,7 +141,7 @@ jobs:
135141
### Installation
136142
```bash
137143
helm upgrade --install trigger \
138-
oci://${{ env.REGISTRY }}/${{ github.repository_owner }}/charts/${{ env.CHART_NAME }} \
144+
oci://${{ env.REGISTRY }}/${{ steps.owner.outputs.lc }}/charts/${{ env.CHART_NAME }} \
139145
--version "${{ steps.version.outputs.version }}"
140146
```
141147

0 commit comments

Comments
 (0)