-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.13 KB
/
Copy pathlinux.yml
File metadata and controls
36 lines (34 loc) · 1.13 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
name: Build Yubenbango
on:
workflow_dispatch:
schedule:
# * is a special character in YAML, so you have to quote this string
- cron: '0 0 1 * *' # run job on the first day of every month
jobs:
build:
runs-on: ubuntu-latest
outputs:
change_detected: ${{ steps.commit_and_push.outputs.change_detected }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- run: pip install -r requirements.txt
- run: make all
- run: zip -r data/yubenbango.zip data/yubenbango.sqlite
- name: Commit and push if zip codes changed
id: commit_and_push
run: |
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Jurisdictions and postal codes updated on ${timestamp}" || exit 0
git push
echo "::set-output name=change_detected::1"
- uses: actions/upload-artifact@v4
with:
name: yubenbango_sqlite_db
path: data/yubenbango.zip