Skip to content

Commit 9cf6d17

Browse files
committed
add workflows/release.yaml
1 parent 3dcad72 commit 9cf6d17

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

Diff for: .github/workflows/release.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Release Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- oshribr-create-github-repo-for-publishing-charts-RED-98120
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write # to push chart release and create a release (helm/chart-releaser-action)
12+
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Configure Git
21+
run: |
22+
git config user.name "$GITHUB_ACTOR"
23+
git config user.email "[email protected]"
24+
- name: Set up Helm
25+
uses: azure/[email protected]
26+
with:
27+
version: v3.9.2
28+
29+
- name: Run chart-releaser
30+
uses: helm/[email protected]
31+
env:
32+
CR_TOKEN: "${{ github.token }}"
33+
34+
generate-page:
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: write # Needed to commit the generated file
38+
needs:
39+
- release
40+
steps:
41+
- uses: actions/checkout@v4
42+
with:
43+
ref: gh-pages
44+
fetch-depth: 0
45+
46+
- name: debug-print
47+
run: |
48+
echo "Current directory is $(pwd)"
49+
echo "Contents of the directory are $(ls -la)"
50+
echo "Contents of the directory are $(ls -la /home/runner/work/helm-release/helm-release/)"
51+
52+
- name: Generate Helm Charts HTML
53+
uses: ./.github/actions/generate-helm-html-index
54+
with:
55+
index-file: 'index.yaml'
56+
output-file: 'index.html'
57+
58+
- name: Commit and Push
59+
run: |
60+
git config --local user.email "[email protected]"
61+
git config --local user.name "GitHub Action"
62+
git add index.html
63+
git commit -m "Update Helm charts page" || exit 0 # Don't fail if no changes
64+
git push

0 commit comments

Comments
 (0)