Skip to content

Commit d1bfab5

Browse files
authored
Update update-data.yml
1 parent 08afaa3 commit d1bfab5

File tree

1 file changed

+6
-62
lines changed

1 file changed

+6
-62
lines changed

.github/workflows/update-data.yml

+6-62
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,25 @@
11
name: Update data
22

33
on:
4-
# Run every month on the 2nd at 6:30 UTC
54
schedule:
65
- cron: "30 21 2 * *"
76
workflow_dispatch:
87
push:
98
paths:
109
- ".github/workflows/update-data.yml"
1110
- "config.php"
11+
- "data.csv"
1212
- "overpass/*"
1313
pull_request:
1414
paths:
1515
- ".github/workflows/update-data.yml"
1616
- "config.php"
17+
- "data.csv"
1718
- "overpass/*"
1819

1920
jobs:
2021
update-data:
21-
runs-on: ubuntu-latest
22-
steps:
23-
- uses: actions/checkout@v3
24-
with:
25-
repository: ${{ github.repository_owner }}/equalstreetnames
26-
persist-credentials: false
27-
submodules: true
28-
29-
- name: Validate composer.json and composer.lock
30-
working-directory: process
31-
run: composer validate
32-
- name: Install dependencies
33-
working-directory: process
34-
run: composer install --prefer-dist --no-progress
35-
36-
- name: Checkout submodule to master
37-
working-directory: cities/poland/wroclaw
38-
run: git checkout -q master
39-
- name: Update sub-modules
40-
run: git submodule update --remote --merge cities/poland/wroclaw
41-
42-
- name: Run update
43-
working-directory: process
44-
run: composer run update-data -- --city=poland/wroclaw
45-
46-
# - name: Upload artifact
47-
# uses: actions/upload-artifact@v2
48-
# with:
49-
# name: Wrocław
50-
# path: cities/poland/wroclaw/data/*
51-
52-
- name: Commit sub-module
53-
if: ${{ github.event_name != 'pull_request' }}
54-
working-directory: cities/poland/wroclaw
55-
run: |
56-
git config user.name github-actions[bot]
57-
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
58-
git add data/*
59-
git commit -m "🗃 Update data"
60-
- name: Push to sub-module
61-
uses: ad-m/github-push-action@master
62-
if: ${{ github.event_name != 'pull_request' }}
63-
with:
64-
github_token: ${{ secrets.ACCESS_TOKEN }}
65-
directory: cities/poland/wroclaw
66-
repository: ${{ github.repository }}
67-
68-
- name: Commit main repository
69-
if: ${{ github.event_name != 'pull_request' }}
70-
run: |
71-
git config user.name github-actions[bot]
72-
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
73-
git pull
74-
git add cities/poland/wroclaw
75-
git commit -m "🗃 Update Wrocław sub-module"
76-
- name: Push to main repository
77-
uses: ad-m/github-push-action@master
78-
if: ${{ github.event_name != 'pull_request' }}
79-
with:
80-
github_token: ${{ secrets.ACCESS_TOKEN }}
81-
repository: ${{ github.repository_owner }}/equalstreetnames
22+
uses: EqualStreetNames/equalstreetnames/.github/workflows/reusable-update-date.yml@master
23+
secrets: inherit
24+
with:
25+
city: poland/wroclaw

0 commit comments

Comments
 (0)