Skip to content

Update data

Update data #56

Workflow file for this run

name: Update data
on:
# Run every month on the 1st at 12:30 UTC
schedule:
- cron: "30 12 1 * *"
push:
paths:
- ".github/workflows/update-data.yml"
- "config.php"
- "overpass/*"
pull_request:
paths:
- ".github/workflows/update-data.yml"
- "config.php"
- "overpass/*"
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: EqualStreetNames/equalstreetnames
persist-credentials: false
submodules: true
- name: Use PHP 7.4
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: curl, pdo, sqlite3
- name: Validate composer.json and composer.lock
working-directory: process
run: composer validate
- name: Install dependencies
working-directory: process
run: composer install --prefer-dist --no-progress
- name: Checkout submodule to master
working-directory: cities/netherlands/groningen
run: git checkout -q master
- name: Update sub-modules
run: git submodule update --remote --merge cities/netherlands/groningen
- name: Run update
working-directory: process
run: composer run update-data -- --city=netherlands/groningen
# - name: Upload artifact
# uses: actions/upload-artifact@v2
# with:
# name: Groningen
# path: cities/netherlands/groningen/data/*
- name: Commit sub-module
if: ${{ github.event_name != 'pull_request' }}
working-directory: cities/netherlands/groningen
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add data/*
git commit -m "🗃 Update data"
- name: Push to sub-module
uses: ad-m/github-push-action@master
if: ${{ github.event_name != 'pull_request' }}
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
directory: cities/netherlands/groningen
repository: EqualStreetNames/equalstreetnames-groningen
- name: Commit repository
if: ${{ github.event_name != 'pull_request' }}
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git pull
git add cities/netherlands/groningen
git commit -m "🗃 Update Groningen sub-module"
- name: Push to repository
uses: ad-m/github-push-action@master
if: ${{ github.event_name != 'pull_request' }}
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
repository: EqualStreetNames/equalstreetnames