Fix Helm chart push URL using vars.PACKAGES_REGISTRY
- Use vars.PACKAGES_REGISTRY with fallback to gitea.server_url - Consistent with build.yml pattern for registry URLs - Fixed curl command URL construction issue - Applied same pattern to all registry references in the workflow
This commit is contained in:
@@ -40,7 +40,7 @@ jobs:
|
||||
cp -r helm/api7ee-demo-k8s /tmp/api7ee-demo-k8s-chart
|
||||
|
||||
# Update image registry and repository to match Gitea
|
||||
sed -i "s|registry: gitea.server_url|registry: ${{ gitea.server_url }}|g" /tmp/api7ee-demo-k8s-chart/values.yaml
|
||||
sed -i "s|registry: gitea.server_url|registry: ${{ vars.PACKAGES_REGISTRY || gitea.server_url }}|g" /tmp/api7ee-demo-k8s-chart/values.yaml
|
||||
sed -i "s|repository: gitea.repository/|repository: ${{ gitea.repository }}/|g" /tmp/api7ee-demo-k8s-chart/values.yaml
|
||||
|
||||
# Package the chart
|
||||
@@ -59,11 +59,11 @@ jobs:
|
||||
-H "Authorization: token ${{ secrets.PACKAGES_PUSH_TOKEN }}" \
|
||||
-X POST \
|
||||
-F "chart=@${CHART_FILE}" \
|
||||
https://${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/helm/api/charts
|
||||
${{ vars.PACKAGES_REGISTRY || gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/helm/api/charts
|
||||
|
||||
echo "✅ Helm chart pushed successfully to Gitea Package Registry"
|
||||
echo "📦 Chart: ${CHART_FILE}"
|
||||
echo "🔗 Registry URL: https://${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/helm"
|
||||
echo "🔗 Registry URL: ${{ vars.PACKAGES_REGISTRY || gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/helm"
|
||||
|
||||
|
||||
- name: Summary
|
||||
@@ -72,11 +72,11 @@ jobs:
|
||||
echo ""
|
||||
echo "- **Version:** ${VERSION}"
|
||||
echo "- **Chart:** ${CHART_FILE}"
|
||||
echo "- **Registry:** https://${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/helm"
|
||||
echo "- **Registry:** ${{ vars.PACKAGES_REGISTRY || gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/helm"
|
||||
echo ""
|
||||
echo "### Installation"
|
||||
echo '```bash'
|
||||
echo "helm repo add api7ee https://${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/helm"
|
||||
echo "helm repo add api7ee ${{ vars.PACKAGES_REGISTRY || gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/helm"
|
||||
echo "helm repo update"
|
||||
echo "helm install my-api7ee api7ee/api7ee-demo-k8s --version ${VERSION}"
|
||||
echo '```'
|
||||
|
||||
Reference in New Issue
Block a user