-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.17 KB
/
dispatch-calls.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
name: Pull and Archive Active Police Dispatch Calls
on:
workflow_dispatch: {}
schedule:
- cron: '*/10 * * * *'
jobs:
Pull-Active-Police-Dispatch-Calls:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
cache: 'pip'
- name: Install dependencies
run: |
pip install -r requirements.txt
working-directory: active-police-dispatch-calls
- name: Get current date
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
- name: Run script
run: |
python scrape.py
working-directory: active-police-dispatch-calls
- name: Commit to repo
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "there are changes to commit";
else
exit 0;
fi
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add .
git commit -m "Active Police Dispatch Calls: ${{ env.NOW }}"
git push
working-directory: active-police-dispatch-calls