Skip to content

Commit 26ac432

Browse files
committed
Refactor annotate workflow to trigger on pull requests and improve Git operations
1 parent fa71a80 commit 26ac432

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/annotate.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: annotate
22

33
on:
4-
workflow_dispatch:
4+
pull_request:
5+
branches: [ "*" ]
56

67
jobs:
78
update-docblocks:
@@ -14,7 +15,7 @@ jobs:
1415
- name: Checkout code
1516
uses: actions/checkout@v5
1617
with:
17-
ref: ${{ github.ref }}
18+
token: ${{ secrets.GITHUB_TOKEN }}
1819

1920
- name: Install jq
2021
run: sudo apt-get install -y jq
@@ -54,4 +55,5 @@ jobs:
5455
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
5556
git add .
5657
git commit -m "Update docblocks."
57-
git push
58+
git pull --rebase origin ${{ github.head_ref }}
59+
git push origin HEAD:${{ github.head_ref }}

0 commit comments

Comments
 (0)