Merge branch 'PBH-BTN:main' into main #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Combine TXT Files | |
on: | |
push: | |
paths: | |
- '**.txt' | |
workflow_dispatch: | |
jobs: | |
combine-txt-files: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Create combine directory | |
run: mkdir -p combine | |
- name: Combine txt files | |
run: | | |
# Combine all .txt files except combine/all.txt to avoid recursion | |
find . -name "*.txt" ! -path "./combine/all.txt" -exec cat {} + > combine/all.txt | |
- name: Commit and push changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add combine/all.txt | |
git diff-index --quiet HEAD || git commit -m '[ci skip] Combine all txt files into combine/all.txt' | |
git push |