This repository has been archived by the owner on Oct 20, 2024. It is now read-only.
Update listing.yml #7
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: Commit Changes | |
on: [push] | |
jobs: | |
commit_changes: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run Python script | |
run: python indexer.py ./ # Replace 'your_script.py' with the path to your Python script | |
- name: Find new files | |
id: find_files | |
run: | | |
git diff --name-only --diff-filter=A origin/main..HEAD > files_created.txt | |
- name: Commit new files | |
if: steps.find_files.outputs.stdout != '' | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "GitHub Actions" | |
git add -A | |
git commit -m "Auto-commit new files" || echo "No changes to commit" | |
git push | |