Skip to content

Commit 8ce4649

Browse files
committed
Add GitHub Action to run geocode.py and commit results
Add a GitHub Actions workflow to run `geocode.py` manually and commit the results to the repository. * **Add requirements.txt**: List dependencies required for `geocode.py`. * **Add .github/workflows/geocode.yml**: - Check out the repository using `actions/checkout@v2`. - Set up Python 3.x using `actions/setup-python@v2`. - Install dependencies from `requirements.txt`. - Run `geocode.py`. - Commit and push the results to the repository. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/neon-ninja/shards?shareId=XXXX-XXXX-XXXX-XXXX).
1 parent 89b7789 commit 8ce4649

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/geocode.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Run geocode.py
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
geocode:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Check out repository
12+
uses: actions/checkout@v2
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install -r requirements.txt
23+
24+
- name: Run geocode.py
25+
run: python geocode.py
26+
27+
- name: Commit results
28+
run: |
29+
git config --global user.name 'github-actions[bot]'
30+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
31+
git commit -am 'Geocode'
32+
git push

requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pandas
2+
geopandas
3+
requests
4+
requests_cache
5+
shapely
6+
timezonefinder
7+
tqdm

0 commit comments

Comments
 (0)