Skip to content

Commit ac9553a

Browse files
author
Darius Neațu
committed
Add debug info and repository settings check for workflow_dispatch
1 parent 8b2cff9 commit ac9553a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/sync-docs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ jobs:
5656
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
5757
echo "Generated branch name: $BRANCH_NAME"
5858
59+
- name: Debug workflow context
60+
run: |
61+
echo "Event name: ${{ github.event_name }}"
62+
echo "Ref: ${{ github.ref }}"
63+
echo "Head ref: ${{ github.head_ref }}"
64+
echo "Base ref: ${{ github.base_ref }}"
65+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
66+
echo "Test mode: ${{ github.event.inputs.test_mode }}"
67+
fi
68+
5969
- name: Show changes (for PR testing)
6070
if: github.event_name == 'pull_request'
6171
run: |
@@ -85,6 +95,18 @@ jobs:
8595
RaduNichita
8696
mguludag
8797
98+
- name: Check repository settings
99+
if: github.event_name == 'workflow_dispatch'
100+
run: |
101+
echo "ℹ️ If you get permission errors, check repository settings:"
102+
echo " 1. Go to Settings > Actions > General"
103+
echo " 2. Under 'Workflow permissions', ensure 'Read and write permissions' is selected"
104+
echo " 3. Check 'Allow GitHub Actions to create and approve pull requests'"
105+
echo ""
106+
echo "Current workflow permissions:"
107+
echo " contents: write = ${{ github.event_name != 'pull_request' }}"
108+
echo " pull-requests: write = ${{ github.event_name != 'pull_request' }}"
109+
88110
- name: Create Pull Request (test mode via workflow_dispatch)
89111
if: github.event_name == 'workflow_dispatch' && github.event.inputs.test_mode == 'true'
90112
uses: peter-evans/create-pull-request@v6

0 commit comments

Comments
 (0)