Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cbarbian-sap committed Jul 24, 2023
1 parent b8d0f1a commit 8ce56b7
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Create helm-index branch if missing
run: |
if ! git rev-parse --verify remotes/origin/helm-index &>/dev/null; then
git switch --orphan helm-index
git config user.name "${{ vars.WORKFLOW_USER_NAME }}"
git config user.email "${{ vars.WORKFLOW_USER_EMAIL }}"
git commit --allow-empty -m "Initial commit"
git push --set-upstream origin helm-index
fi
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -76,8 +88,8 @@ jobs:
helm repo index --url ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }} --merge ./index/index.yaml .
mv index.yaml index
cd index
git config user.name github-actions
git config user.email [email protected]
git config user.name "${{ vars.WORKFLOW_USER_NAME }}"
git config user.email "${{ vars.WORKFLOW_USER_EMAIL }}"
git add index.yaml
git commit -m "Release ${{ github.event.release.tag_name }}"
git push
Expand Down

0 comments on commit 8ce56b7

Please sign in to comment.