-
-
Notifications
You must be signed in to change notification settings - Fork 76
70 lines (59 loc) · 2.28 KB
/
update-index.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# https://canovasjm.netlify.app/2020/11/29/github-actions-run-a-python-script-on-schedule-and-commit-changes/
name: update-index
on:
workflow_dispatch:
schedule:
# run at 15:00 UTC every day (8am PDT/UTC-7)
- cron: '0 15 * * *'
jobs:
update-index:
runs-on: ubuntu-latest
steps:
- name: run actions/checkout@v3
uses: actions/checkout@v3
# fails: https://github.com/rasa/scoop-directory/runs/4252997621?check_suite_focus=true#step:7:8
# - name: run actions/cache@v2 - pip
# uses: actions/cache@v2
# id: pip
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-
# causes errors, see
# https://github.com/rasa/scoop-directory/runs/4265697748?check_suite_focus=true#step:6:1097
# - name: run actions/cache@v2 - cache
# uses: actions/cache@v2
# id: cache
# with:
# path: cache
# key: ${{ runner.os }}-cache-${{ hashFiles('**/cache.pickle') }}
# restore-keys: |
# ${{ runner.os }}-cache-
- name: run actions/setup-python@v4
uses: actions/setup-python@v4
with:
# Needs to stay 3.9 for now. See
# https://github.com/rasa/scoop-directory/runs/8008782733?check_suite_focus=true#step:5:14
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- name: run pip install -r maintenance/requirements.txt
# if: steps.pip.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -r maintenance/requirements.txt
- name: run python maintenance/github-crawler.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python maintenance/github-crawler.py
- name: run git commit -am "update index [ci skip]"
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -am "update index [ci skip]"
- name: run ad-m/[email protected]
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master