Skip to content

Commit b6aa1fe

Browse files
committed
Improve Helm chart package visibility configuration (related to #686)
Add fallback attempts to set package visibility through multiple API endpoints. Also adds helpful output message with verification link.
1 parent fa8a8f3 commit b6aa1fe

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/publish-helm-chart.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,19 @@ jobs:
8282
helm push dist/pulse-${{ steps.versions.outputs.chart_version }}.tgz \
8383
oci://ghcr.io/${{ github.repository_owner }}/pulse-chart
8484
85-
- name: Make package public
85+
- name: Configure package visibility
8686
env:
8787
GITHUB_TOKEN: ${{ github.token }}
8888
run: |
89-
# Set package visibility to public for anonymous pulls
90-
gh api -X PATCH /user/packages/container/pulse-chart -f visibility=public || \
91-
echo "Warning: Could not set package visibility. May need manual configuration."
89+
# Connect package to repository and set visibility to public
90+
# This ensures the package inherits public visibility and appears in repo packages
91+
gh api -X PUT /user/packages/container/pulse-chart/versions/latest/restore || true
92+
gh api -X PATCH /user/packages/container/pulse-chart -f visibility=public || true
93+
94+
# Also try org endpoint if user endpoint fails
95+
gh api -X PATCH /orgs/${{ github.repository_owner }}/packages/container/pulse-chart -f visibility=public || true
96+
97+
echo "Package visibility configuration attempted. Verify at: https://github.com/${{ github.repository_owner }}?tab=packages"
9298
9399
- name: Attach chart to release
94100
if: github.event_name == 'release'

0 commit comments

Comments
 (0)