-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release fails if gh-pages branch doesn't yet exist #10
Comments
In the meanwhile one could add this step in GH action for pull request (e.g. linting your chart): - name: Check for gh-pages branch
run: |
git ls-remote --exit-code --heads origin gh-pages |
- This requires a 'gh-pages' branch present on the remote: helm/chart-releaser-action#10 - Requires a CR_TOKEN secret to be defined with push permissions withing the GitHub repo that runs on. - Publishes the helm repo with github pages, so it can be consumed with: helm repo add owncloud https://owncloud.github.io/charts
I'm not sure how this helps, it just shifts the failure from later stage to early. It would be nice to have documented how to create this branch. |
My workaround: - name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Create gh-pages branch if it doesn't exist
continue-on-error: true
run: |
git checkout -b gh-pages || exit 1
git rebase main
git push origin gh-pages
git checkout main
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
env:
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }} But I think this is very ugly... I'll probably do my own thing instead. This action is not what I expected tbh.. Edit: To my surprise it works quite well once you get the hang of it. |
the
cr.sh
script creates the worktree for gh-pages branch fails when thegh-pages
doesn't yet exist.We should add some logic to check if it exists, and if not, add it, rather than fail
https://github.com/helm/chart-releaser-action/blob/master/cr.sh#L217
The text was updated successfully, but these errors were encountered: