Merge pull request #8 from seikhchilli/26A #24
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: Update README on Push | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.12' | |
- name: Run Python script to update README | |
run: | | |
CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD) | |
echo "$CHANGED_FILES" | |
python update_readme.py $CHANGED_FILES | |
- name: Commit changes | |
run: | | |
git config --local user.email "actions@github.com" | |
git config --local user.name "GitHub Actions" | |
git add README.md | |
git commit -m "Update README" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.CODEFORCES_GITHUB_TOKEN }} |