File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,6 +214,11 @@ async function updateHomebrew(version) {
214214Auto-updated by GitHub Actions` ;
215215
216216 execSync ( `git commit -m "${ commitMessage } "` , { cwd : homebrewPath } ) ;
217+ // Push using the token if available (for GitHub Actions)
218+ const token = process . env . GITHUB_TOKEN ;
219+ if ( token ) {
220+ execSync ( `git remote set-url origin https://${ token } @github.com/hungthai1401/homebrew-tap.git` , { cwd : homebrewPath } ) ;
221+ }
217222 execSync ( "git push origin main" , { cwd : homebrewPath } ) ;
218223 console . log ( "✅ Pushed to homebrew-tap repository" ) ;
219224 } catch ( error ) {
Original file line number Diff line number Diff line change 5959 node .github/workflows/scripts/update-homebrew.js ${{ steps.version.outputs.version }}
6060 env :
6161 OCCTX_VERSION : ${{ steps.version.outputs.version }}
62+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6263
6364 - name : Verify formula was updated
6465 run : |
You can’t perform that action at this time.
0 commit comments