From 62e5bdacf7a0c7e17cb9dae2492003f1e9e082e0 Mon Sep 17 00:00:00 2001 From: pombas_n Date: Thu, 1 Oct 2026 07:58:15 +0200 Subject: [PATCH] Update .gitea/workflows/proofread.yaml --- .gitea/workflows/proofread.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/proofread.yaml b/.gitea/workflows/proofread.yaml index 5202860a..3a1a05fc 100644 --- a/.gitea/workflows/proofread.yaml +++ b/.gitea/workflows/proofread.yaml @@ -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"