-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bfe55c5
commit 13056f8
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,16 @@ jobs: | |
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Merge site.yaml into index.yaml | ||
run: python3 add_additional_info.py | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git add index.yaml | ||
git commit -m "Update index.yaml with custom fields from site.yaml" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import yaml | ||
import os | ||
|
||
def merge_site_into_index(chart_dir, index_file): | ||
index_data = {} | ||
with open(index_file, 'r') as index: | ||
index_data = yaml.safe_load(index) | ||
|
||
for chart in index_data['entries']: | ||
site_file = os.path.join(chart_dir, chart, 'site.yaml') | ||
if os.path.exists(site_file): | ||
with open(site_file, 'r') as site: | ||
site_data = yaml.safe_load(site) | ||
for version in index_data['entries'][chart]: | ||
version.update(site_data) | ||
|
||
with open(index_file, 'w') as index: | ||
yaml.dump(index_data, index, default_flow_style=False) | ||
|
||
chart_dir = './charts' # Adjust this path if necessary | ||
index_file = 'index.yaml' | ||
merge_site_into_index(chart_dir, index_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
image_url: "https://www.nginx.com/wp-content/uploads/2021/08/NGINX-Part-of-F5-horiz-black-type-1.svg" |