Skip to content

Generate SVG on Push #12646

Generate SVG on Push

Generate SVG on Push #12646

Workflow file for this run

name: Generate SVG on Push
on:
schedule:
- cron: "30 * * * *"
push:
branches:
- main
jobs:
generate_pr_svg:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11.4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run Python script
run: python generator/recent_pr/get_pr.py # Replace "your_script.py" with the name of your Python script
- name: Check for changes and Commit changes
run: |
if git diff --exit-code; then
echo "No changes to commit."
exit 0
else
git config --global user.name "KKtheGhost"
git config --global user.email "[email protected]"
git add ./mini_boards/pr.svg
git commit -m "update: PR.svg"
git push
fi