Skip to content

Update data

Update data #4

Workflow file for this run

name: Update data
on:
# Run every month on the 2nd at 1:00 UTC
schedule:
- cron: "30 23 2 * *"
workflow_dispatch:
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: ${{ github.repository_owner }}/equalstreetnames
persist-credentials: false
submodules: true
- 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/hungary/budapest
run: git checkout -q master
- name: Update sub-modules
run: git submodule update --remote --merge cities/hungary/budapest
- name: Run update
working-directory: process
run: composer run update-data -- --city=hungary/budapest
# - name: Upload artifact
# uses: actions/upload-artifact@v2
# with:
# name: Budapest
# path: cities/hungary/budapest/data/*
- name: Commit sub-module
if: ${{ github.event_name != 'pull_request' }}
working-directory: cities/hungary/budapest
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/hungary/budapest
repository: ${{ github.repository }}
- name: Commit main 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/hungary/budapest
git commit -m "πŸ—ƒ Update Budapest sub-module"
- name: Push to main repository
uses: ad-m/github-push-action@master
if: ${{ github.event_name != 'pull_request' }}
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
repository: ${{ github.repository_owner }}/equalstreetnames