File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,14 +18,15 @@ jobs:
1818 permissions :
1919 contents : write
2020 pull-requests : write
21+ actions : write
2122
2223 steps :
2324 - name : Checkout PR code
2425 uses : actions/checkout@v4
2526 with :
2627 ref : ${{ github.event.pull_request.head.sha || format('refs/pull/{0}/head', github.event.inputs.pr_number) }}
2728 fetch-depth : 0
28- token : ${{ secrets.GITHUB_TOKEN }}
29+ token : ${{ secrets.GITHUB_TOKEN || github.token }}
2930
3031 - name : Get REAL validation script from v3-alpha
3132 run : |
@@ -111,8 +112,19 @@ jobs:
111112 BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
112113 else
113114 # For manual workflow dispatch, get PR info
114- PR_INFO=$(gh pr view ${{ steps.pr_info.outputs.pr_number }} --json headRefName)
115+ PR_INFO=$(gh pr view ${{ steps.pr_info.outputs.pr_number }} --json headRefName,headRepository )
115116 BRANCH_NAME=$(echo "$PR_INFO" | jq -r '.headRefName')
117+ HEAD_REPO=$(echo "$PR_INFO" | jq -r '.headRepository.name')
118+
119+ echo "🔍 PR source branch: $BRANCH_NAME"
120+ echo "🔍 Head repository: $HEAD_REPO"
121+
122+ # Don't push if this is from a fork or if branch is v3-alpha (main branch)
123+ if [ "$HEAD_REPO" != "wails" ] || [ "$BRANCH_NAME" = "v3-alpha" ]; then
124+ echo "⚠️ Cannot push - either fork or direct v3-alpha branch. Manual fix required."
125+ echo "committed=false" >> $GITHUB_OUTPUT
126+ exit 0
127+ fi
116128 fi
117129
118130 echo "Pushing to branch: $BRANCH_NAME in repo: $REPO_OWNER"
You can’t perform that action at this time.
0 commit comments