Get Daily #771
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: Get Daily | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0,13 * * *" | |
env: | |
GITHUB_NAME: yihong0618 | |
GITHUB_EMAIL: zouzou0208@gmail.com | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: My GitHub Status | |
uses: yihong0618/github-readme-stats@main | |
with: | |
GH_TOKEN: "${{ secrets.G_T }}" | |
WITH_STARED: false | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Generate new daily | |
run: | | |
python get_daily.py ${{ secrets.G_T }} ${{ github.repository }} ${{ secrets.CICHANG_USER_NAME }} ${{ secrets.CICHANG_PASSWORD }} ${{ secrets.FORST_EMAIL }} ${{ secrets.FORST_PASSWORD }} | |
python main.py ${{ secrets.G_T }} ${{ github.repository }} | |
- name: Push README | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "new daily stats" || echo "no file change" | |
git push || echo "no need push" |