forked from linux/documentation
Update .gitea/workflows/proofread.yaml
This commit is contained in:
1 parent
0e91c56ae9
commit
62e5bdacf7
1 file changed
+14
-5
@@ -16,18 +16,26 @@ jobs:
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Fix Markdown typos
|
||||
continue-on-error: true
|
||||
uses: actions/typos@v1.50.3
|
||||
with:
|
||||
files: "**/*.md"
|
||||
write_changes: true
|
||||
|
||||
- name: Commit to branch and push fixes
|
||||
- name: Check for typo fixes
|
||||
id: changes
|
||||
run: |
|
||||
git fetch origin main
|
||||
git checkout -B typos origin/main
|
||||
|
||||
if git diff --quiet; then
|
||||
echo "No typo fixes needed."
|
||||
echo "changed=false" >> "${GITHUB_OUTPUT}"
|
||||
else
|
||||
echo "changed=true" >> "${GITHUB_OUTPUT}"
|
||||
fi
|
||||
|
||||
- name: Commit to branch and push fixes
|
||||
if: steps.changes.outputs.changed == 'true'
|
||||
run: |
|
||||
git checkout -B typos
|
||||
|
||||
git config user.name "typos-bot"
|
||||
git config user.email "typos-bot@localhost"
|
||||
|
||||
@@ -36,6 +44,7 @@ jobs:
|
||||
git push origin typos --force
|
||||
|
||||
- name: Create pull request
|
||||
if: steps.changes.outputs.changed == 'true'
|
||||
uses: actions/pullrequest@main
|
||||
with:
|
||||
title: "Fix markdown typos"
|
||||
|
||||
Reference in new issue
Block a user