File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 - name : Ensure gh-pages branch exists
3434 shell : bash
3535 run : |
36+ set -euo pipefail
37+ SRC_BRANCH="${GITHUB_REF_NAME}"
3638 if ! git ls-remote --exit-code --heads origin gh-pages >/dev/null 2>&1; then
3739 echo "Initializing gh-pages branch"
3840 git checkout --orphan gh-pages
4244 git add .nojekyll
4345 git commit -m "Initialize gh-pages for Helm chart index"
4446 git push origin gh-pages
45- git checkout -
47+ # Switch back to the source branch explicitly
48+ git fetch origin "$SRC_BRANCH" --depth=1
49+ git checkout "$SRC_BRANCH"
4650 fi
4751
4852 - name : Compute branch-specific paths
6367 - name : Release with chart-releaser (branch)
6468 uses : helm/chart-releaser-action@v1.6.0
6569 env :
66- CR_TOKEN : ${{ secrets.GITHUB_TOKEN }}
70+ CR_TOKEN : ${{ github.token }}
6771 CR_PAGES_BRANCH : gh-pages
6872 CR_CHARTS_DIR : deployments/kubernetes/chart
6973 CR_SKIP_EXISTING : true
You can’t perform that action at this time.
0 commit comments