Skip to content

Commit

Permalink
Исправление GITHUB_TOKEN и Updating dependencies. Проверка версии чар…
Browse files Browse the repository at this point in the history
…та в Chart
  • Loading branch information
Alexander Voronkov committed Jan 14, 2025
1 parent 5fcc3e6 commit 88304a2
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/release-oci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
uses: azure/setup-helm@v3
with:
version: latest # Используем последнюю стабильную версию Helm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# ШАГ 5. Обрабатываем все чарты в директории ./charts
- name: Find and package Helm charts
Expand All @@ -62,10 +64,20 @@ jobs:
chart_dir=$(dirname $chart_path) # Директория чарта
echo "Processing chart in directory: $chart_dir"

# Обновляем версию в Chart.yaml на основе тега
sed -i -E "s/^version:.*/version: ${TAG_VERSION}/" $chart_path
echo "Updated Chart.yaml:"
cat $chart_path # Выводим файл для проверки
# Проверяем, соответствует ли версия в Chart.yaml версии тега
echo "Checking version in Chart.yaml for $chart_path..."
current_version=$(grep '^version:' "$chart_path" | awk '{print $2}') # Извлекаем текущую версию из Chart.yaml

if [ "$current_version" != "${TAG_VERSION}" ]; then
echo "Error: Version mismatch in $chart_path. Expected: ${TAG_VERSION}, Found: ${current_version}"
exit 1
fi

echo "Version in $chart_path matches the expected version: ${TAG_VERSION}"

# Обновляем зависимости чарта
echo "Updating dependencies for chart: $chart_dir"
helm dependency update "$chart_dir"

# Упаковываем чарт
helm package $chart_dir --destination ./packaged
Expand Down

0 comments on commit 88304a2

Please sign in to comment.