File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : docblock_update
2+
3+ on :
4+ pull_request :
5+ branches : [ "*" ]
6+
7+ jobs :
8+ update-docblocks :
9+ runs-on : ubuntu-latest
10+ permissions :
11+ contents : write
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v5
16+ with :
17+ token : ${{ secrets.GITHUB_TOKEN }}
18+ ref : ${{ github.head_ref || github.ref }}
19+ fetch-depth : 0
20+
21+ - name : Update docblocks
22+ run : |
23+ set -e
24+ SOURCE_URL=$(jq -r '.support.source' composer.json)
25+ if [ ! -d ./src ]; then
26+ echo "Source directory ./src does not exist!"
27+ exit 1
28+ fi
29+ docker run --rm -v "$PWD/src:/app/run" davidsmith3/docblock-annotator-cli \
30+ docblock-annotator-cli:update-directory /app/run "@link $SOURCE_URL"
31+
32+ - name : Commit and push changes (if any)
33+ run : |
34+ set -e
35+ git config --local user.email "action@github.com"
36+ git config --local user.name "GitHub Action"
37+ git add -A
38+ if ! git diff --cached --quiet; then
39+ git commit -m "Update docblocks with @link annotations" --no-verify
40+ git push
41+ else
42+ echo "No changes to commit."
43+ fi
You can’t perform that action at this time.
0 commit comments