Merge branch 'main' of github.com:sachinshakya507/charts #207
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
name: Release Charts | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Install Helm | |
uses: azure/setup-helm@v3 | |
- name: Run chart-releaser | |
id: chart-releaser | |
uses: helm/[email protected] | |
with: | |
charts_dir: helm | |
pages_branch: main | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
# Move the index.yaml file in the same job | |
- name: Move Updated File | |
if: steps.chart-releaser.outputs.changed == 'true' | |
run: | | |
cp index.yaml build/index.yaml | |
- name: Commit and Push Changes | |
if: steps.chart-releaser.outputs.changed == 'true' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git pull | |
git add build/index.yaml | |
git commit -m "Update index.yaml in build" | |
git push |