Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jdetroyes committed Oct 13, 2024
1 parent 0aa30ff commit 62a3b08
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release Charts

on:
workflow_dispatch:
push:
branches:
- main
paths:
- "charts/**"

permissions:
contents: read

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Set up Helm
uses: azure/setup-helm@v4

- name: Add chart dependencies
run: |
find . -name "Chart.yaml" -print0 | while IFS= read -r -d '' chart; do
if grep -q "dependencies:" "$chart"; then
dependencies=$(yq e '.dependencies[] | .repository + " " + .name' "$chart")
while read -r repo name; do
if ! helm repo list | grep -q "$repo"; then
helm repo add "$name" "$repo"
fi
done <<< "$dependencies"
chart_dir=$(dirname "$chart")
(cd "$chart_dir" && helm dependency build)
fi
done
- name: Build chart dependencies
run: |
for dir in charts/*/
do
(cd ${dir}; helm dependency build)
done
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_SKIP_EXISTING: true
CR_GENERATE_RELEASE_NOTES: true
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NAME_TEMPLATE: "{{ .Name }}-{{ .Version }}"
Empty file added charts/velero-ui/.gitkeep
Empty file.

0 comments on commit 62a3b08

Please sign in to comment.