Skip to content

Commit 915a012

Browse files
committed
fix: update actions/checkout to v5 and improve commit logic in update-dependents workflow
1 parent ed6e904 commit 915a012

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/update-dependents.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
17+
with:
18+
ref: develop # master is protected; commit docs to develop and let it flow to master via the normal merge
1719

1820
- name: Update dependents info
1921
uses: nvuillam/github-dependents-info@v3.2.0
@@ -31,5 +33,9 @@ jobs:
3133
git config --local user.email "action@github.com"
3234
git config --local user.name "GitHub Action"
3335
git add README.md
34-
git diff --quiet && git diff --staged --quiet || git commit -m "docs: update dependents info"
35-
git push
36+
if git diff --staged --quiet; then
37+
echo "No dependents changes to commit."
38+
else
39+
git commit -m "docs: update dependents info"
40+
git push origin HEAD:develop
41+
fi

0 commit comments

Comments
 (0)