This repository was archived by the owner on May 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.yml
More file actions
73 lines (64 loc) · 1.98 KB
/
sample.yml
File metadata and controls
73 lines (64 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# ワークフロー名
name: test_chatbot
# 発火タイミング
# 日本時刻の朝7時に定期処理(分 時 日 月 曜日)
# UTC の 02:00 は JST だと 11:00 。
# 曜日指定には [0, 6] の整数を使います。 0 が日曜日、 6 が土曜日です。
# 実はgithub actionsのcronの時刻はUTCなので、日本時間に合わせるために日本時刻から9時間マイナスで設定する必要があります。
on:
schedule:
- cron: '0 22 * * *'
jobs:
build:
# Ubuntuの最新版環境内で処理を実行することを指定
runs-on: ubuntu-latest
# 実行する処理&コマンド指定
steps:
# リポジトリからチェックアウトして以下の処理を実行していく
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
# pip更新
python -m pip install --upgrade pip
# 必要なパッケージインストール
pip install line-bot-sdk
- name: Run script
run: |
# main.pyの実行
python main.py
```
```yml
# ワークフロー名
name: test_chatbot
# 発火タイミング
on:
schedule:
- cron: '0 22 * * *'
jobs:
build:
# Ubuntuの最新版環境内で処理
runs-on: ubuntu-latest
# 実行する処理&コマンド指定
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
# pip更新
python -m pip install --upgrade pip
# 必要なパッケージインストール
pip install line-bot-sdk
- name: Run script
env:
CHANNEL_ACCESS_TOKEN: "YOUR_CHANNEL_ACCESS_TOKEN"
USER_ID: "YOUR_USER_ID"
run: |
# main.pyの実行
python main_01.py