Use gitea.repository variable for dynamic image repository paths
- Updated values.yaml to use gitea.repository placeholder - Modified build.yml workflow to replace repository path dynamically - Modified helm-release.yml workflow to replace repository path - This allows the Helm chart to work with any Gitea repository structure - Image paths are now built as: registry/gitea.repository/component
This commit is contained in:
@@ -109,8 +109,9 @@ jobs:
|
|||||||
# Get version from Chart.yaml
|
# Get version from Chart.yaml
|
||||||
CHART_VERSION=$(grep '^version:' helm/api7ee/Chart.yaml | awk '{print $2}')
|
CHART_VERSION=$(grep '^version:' helm/api7ee/Chart.yaml | awk '{print $2}')
|
||||||
|
|
||||||
# Update image registry in values.yaml to match Gitea registry
|
# Update image registry and repository in values.yaml to match Gitea
|
||||||
sed -i "s|registry: gitea.server_url|registry: ${{ gitea.server_url }}|g" helm/api7ee/values.yaml
|
sed -i "s|registry: gitea.server_url|registry: ${{ gitea.server_url }}|g" helm/api7ee/values.yaml
|
||||||
|
sed -i "s|repository: gitea.repository/|repository: ${{ gitea.repository }}/|g" helm/api7ee/values.yaml
|
||||||
|
|
||||||
# Package the chart
|
# Package the chart
|
||||||
helm package helm/api7ee/ --version ${CHART_VERSION}
|
helm package helm/api7ee/ --version ${CHART_VERSION}
|
||||||
|
|||||||
@@ -46,8 +46,9 @@ jobs:
|
|||||||
# Update image tags in values.yaml to use this version
|
# Update image tags in values.yaml to use this version
|
||||||
sed -i "s|tag: \"main\"|tag: \"v${VERSION}\"|g" helm/api7ee/values.yaml
|
sed -i "s|tag: \"main\"|tag: \"v${VERSION}\"|g" helm/api7ee/values.yaml
|
||||||
|
|
||||||
# Update registry to Gitea URL
|
# Update registry and repository to Gitea values
|
||||||
sed -i "s|registry: gitea.server_url|registry: ${{ gitea.server_url }}|g" helm/api7ee/values.yaml
|
sed -i "s|registry: gitea.server_url|registry: ${{ gitea.server_url }}|g" helm/api7ee/values.yaml
|
||||||
|
sed -i "s|repository: gitea.repository/|repository: ${{ gitea.repository }}/|g" helm/api7ee/values.yaml
|
||||||
|
|
||||||
echo "📝 Updated Chart.yaml and values.yaml with version ${VERSION}"
|
echo "📝 Updated Chart.yaml and values.yaml with version ${VERSION}"
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ web:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
registry: gitea.server_url # Will be replaced with actual Gitea URL
|
registry: gitea.server_url # Will be replaced with actual Gitea URL
|
||||||
repository: demos/api7-demo/web
|
repository: gitea.repository/web # Will be replaced with actual repository path
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
tag: "main" # Override with specific version
|
tag: "main" # Override with specific version
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ api:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
registry: gitea.server_url # Will be replaced with actual Gitea URL
|
registry: gitea.server_url # Will be replaced with actual Gitea URL
|
||||||
repository: demos/api7-demo/api
|
repository: gitea.repository/api # Will be replaced with actual repository path
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
tag: "main" # Override with specific version
|
tag: "main" # Override with specific version
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user