|
1 | 1 | name: Update data
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - # Run every month on the 2nd at 6:30 UTC |
5 | 4 | schedule:
|
6 | 5 | - cron: "30 21 2 * *"
|
7 | 6 | workflow_dispatch:
|
8 | 7 | push:
|
9 | 8 | paths:
|
10 | 9 | - ".github/workflows/update-data.yml"
|
11 | 10 | - "config.php"
|
| 11 | + - "data.csv" |
12 | 12 | - "overpass/*"
|
13 | 13 | pull_request:
|
14 | 14 | paths:
|
15 | 15 | - ".github/workflows/update-data.yml"
|
16 | 16 | - "config.php"
|
| 17 | + - "data.csv" |
17 | 18 | - "overpass/*"
|
18 | 19 |
|
19 | 20 | jobs:
|
20 | 21 | 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