schedule #333
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: schedule | |
on: | |
schedule: | |
- cron: "0 9 * * 0" | |
push: | |
branches: | |
- main | |
jobs: | |
excute-python: | |
runs-on: ubuntu-latest | |
env: | |
TZ: Asia/Tokyo | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: excute python | |
env: | |
QIITA_AUTH: ${{secrets.QIITA_AUTH}} | |
run: | | |
git config --local user.email "bot@github.com" | |
git config --local user.name "bot" | |
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git pull --rebase | |
python main.py | |
git add . | |
git commit -m "update by github action" | |
git push |