-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 1.21 KB
/
data_update.yml
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
name: Auto update
on:
push:
branches:
- main
jobs:
run:
runs-on: ubuntu-latest
if: github.actor != 'github_actions'
steps:
- run: echo "🎉 The job was automatically triggered by ${{ github.actor }}."
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Poetry
uses: snok/install-poetry@v1
- run: poetry install --no-interaction
- name: Run akashi_schedule
run: |
poetry run python -m script.akashi_schedule
- name: Commit changes
id: commit
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "GitHub Actions Update"
add: "data/*"
new_branch: data_update_${{github.run_id}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: create pull request
if: steps.commit.outputs.committed == 'true'
run: gh pr create --title 'Data Update' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}