File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,25 +64,30 @@ jobs:
6464 # Verify change
6565 cat "$TEMPLATE"
6666
67- # Push changes to new branch
67+ # Push changes to bot's fork and create PR
68+ VERSION=${GITHUB_REF_NAME#v}
6869 BRANCH="release/vuru-$VERSION"
6970 cd vup
7071 git config user.name "vup-bot"
7172 git config user.email "vup-bot.jzdyf@mailer.me"
7273
73- # Make workflow idempotent
74- git push origin --delete "$BRANCH" || true
74+ # Add bot's fork as remote
75+ git remote add fork https://x-access-token:${{ secrets.BOT_ACCESS_TOKEN }}@github.com/vup-bot/vup.git
76+
77+ # Make workflow idempotent - delete branch from fork if exists
78+ git push fork --delete "$BRANCH" || true
7579
7680 git checkout -b "$BRANCH"
7781 git add vup/srcpkgs/core/vuru/template
7882 git commit -m "auto: update vuru to $VERSION"
79- git push -u origin "$BRANCH"
83+ git push -u fork "$BRANCH"
8084
81- # Create Pull Request
85+ # Create Pull Request from fork to main repo
8286 gh pr create \
87+ --repo VUP-Linux/vup \
8388 --title "auto: update vuru to $VERSION" \
8489 --body "Automated update containing checksum changes for vuru v$VERSION." \
85- --head "$BRANCH" \
90+ --head "vup-bot: $BRANCH" \
8691 --base main
8792 env :
8893 GH_TOKEN : ${{ secrets.BOT_ACCESS_TOKEN }}
You can’t perform that action at this time.
0 commit comments