-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 937 Bytes
/
bike_tracker.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
name: Bike Tracker
on:
schedule:
# Runs every 5 minutes between 8:00 AM and 10:00 AM ET (12:00 PM - 2:00 PM UTC)
- cron: '*/5 19 * * *'
jobs:
track_bikes:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
persist-credentials: false # Disables token for security on public repos
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: pip install requests
- name: Run bike tracking script
run: python get_bikes.py
- name: Commit and push CSV changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add bike_availability.csv
git commit -m "Update bike availability data"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}