Skip to content

scheduledRun

scheduledRun #1425

Workflow file for this run

name: scheduledRun # GitHub Actions
on:
# push:
workflow_dispatch:
schedule:
# cron: [分] [時] [日] [月] [曜日] (UTC)
- cron: '0 0 * * *' # JSTで毎日午前9:00
# - cron: '*/10 * * * *' # テスト用, 10分ごとに実行
jobs:
build:
runs-on: ubuntu-latest # 最新のubuntu環境で下記のジョブを実行
steps:
- uses: actions/checkout@v2
- name: Setup python # ワークフローのセクションごとに設定する名前。特に設定する必要はないが、どこでエラーが起きているかを把握する為にも設定しておいた方が良い。
uses: actions/setup-python@v2 # Pythonのセットアップ
with:
python-version: "3.9" # Pythonのバージョン指定
- name: Install downgraded setuptools
run: pip install "setuptools==57.4.0"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run main.py # Pythonファイルの実行
run: python main.py
- name: Commit & Push # 差分があるか
# continue-on-error: true
run: |
git add -N .
if ! git diff --exit-code --quiet
then
git config user.name kikeda1102
git config user.email kikeda1102.2@gmail.com
git add .
git commit -am "Auto run by GitHub Actions"
git push
fi