Skip to content

Commit 96aa570

Browse files
Update tmp.yml
1 parent 7d4b949 commit 96aa570

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/tmp.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ jobs:
1212
steps:
1313
- name: Checkout repository
1414
uses: actions/checkout@v3
15+
with:
16+
persist-credentials: false # We’ll provide credentials manually
17+
18+
- name: Setup Git identity
19+
run: |
20+
git config user.name "github-actions[bot]"
21+
git config user.email "github-actions[bot]@users.noreply.github.com"
1522
1623
- name: Ultra-precise text-only replacement
1724
run: |
1825
echo "Replacing all 0.1.3 → 0.2.0 in text/code files only..."
19-
# Find files excluding .git/.github
2026
find . -type f ! -path "*/.git/*" ! -path "*/.github/*" -print0 | while IFS= read -r -d '' file; do
21-
# Only process text files
2227
if file --mime "$file" | grep -q 'charset='; then
2328
perl -pi -e 's/(^|[^0-9])0\.1\.3([^0-9]|$)/$1.2.0$2/g' "$file"
2429
fi
2530
done
2631
27-
- name: Show changed files
28-
run: git status
29-
30-
- name: Commit & push
32+
- name: Commit & push changes
3133
run: |
3234
git add .
33-
git commit -m "Text-safe update: 0.1.3 → 0.2.0" || echo "No changes to commit"
34-
git push origin HEAD:${GITHUB_REF#refs/heads/}
35-
env:
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
git diff --cached --quiet || git commit -m "Text-safe update: 0.1.3 → 0.2.0"
36+
git push "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" HEAD:${GITHUB_REF#refs/heads/}

0 commit comments

Comments
 (0)