Skip to content

Replace README AND GENERATE SVG #166

Replace README AND GENERATE SVG

Replace README AND GENERATE SVG #166

name: Replace README AND GENERATE SVG
on:
workflow_dispatch:
inputs:
time:
description: 'time list'
required: false
value:
description: 'value list'
required: false
env:
# change env here
GITHUB_NAME: yihong0618
GITHUB_EMAIL: zouzou0208@gmail.com
jobs:
sync:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip" # caching pip dependencies
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Replace README AND generate SVG
run: |
python main.py $'${{ github.event.inputs.time }}' $'${{ github.event.inputs.value }}'
- name: Push README
run: |
git config --local user.email "${{ env.GITHUB_EMAIL }}"
git config --local user.name "${{ env.GITHUB_NAME }}"
git commit -a -m 'update new heart' || echo "nothing to commit"
git push || echo "nothing to push"