Skip to content

Update Latest Solution Link and Badge #2

Update Latest Solution Link and Badge

Update Latest Solution Link and Badge #2

Workflow file for this run

name: Update Latest Solution Link and Badge
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight UTC
workflow_dispatch:
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install Requests Library
run: pip install requests
- name: Update README with Latest Commit Link
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python src/update_readme.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} README.md "01(Nov)*.md"
- name: Commit and Push Changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add README.md
git commit -m "Update README with latest solution link and badge" || echo "No changes to commit"
git push