File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 3131
3232 - name : Update Homebrew formula
3333 env :
34- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN}}
3534 GH_TOKEN : ${{ steps.app-token.outputs.token }}
3635 run : |
3736 RELEASE_VERSION=${{ github.event.release.tag_name }}
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ if [ "$#" -ne 4 ]; then
2222 exit 1
2323fi
2424
25- # Ensure GitHub token and GH CLI token are set
26- if [[ -z " $GITHUB_TOKEN " || -z " $ GH_TOKEN" ]]; then
27- echo " Error: Required tokens are not set."
25+ # Ensure GitHub app token is set
26+ if [[ -z " $GH_TOKEN " ]]; then
27+ echo " Error: Required token is not set."
2828 exit 1
2929fi
3030
146146# Commit and push updated formula file to remote tap repository
147147git add " $FORMULA_FILE "
148148git commit -m " Update formula to version $NEW_VERSION "
149- git remote set-url origin https://x-access-token:${GITHUB_TOKEN } @${BREW_TAP_REPO_URL# https:// }
149+ git remote set-url origin https://x-access-token:${GH_TOKEN } @${BREW_TAP_REPO_URL# https:// }
150150
151151if ! git push origin " $BRANCH_NAME " ; then
152152 echo " Error: Failed to push branch $BRANCH_NAME "
153153 exit 1
154154fi
155155
156- # Need to unset GITHUB_TOKEN for gh cli to use GH_TOKEN instead
157- unset GITHUB_TOKEN
158-
159156# Create PR
160157if gh pr create --head " $BRANCH_NAME " \
161158 --title " Updates formula to version $NEW_VERSION " \
You can’t perform that action at this time.
0 commit comments