From 93e06a5026dd984ae5ff189d803b6d6cc38c3832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Beli=C3=ABn?= Date: Tue, 19 Mar 2024 21:24:41 +0100 Subject: [PATCH] Update update-data.yml --- .github/workflows/update-data.yml | 68 +++---------------------------- 1 file changed, 6 insertions(+), 62 deletions(-) diff --git a/.github/workflows/update-data.yml b/.github/workflows/update-data.yml index b355d6a..e46d422 100644 --- a/.github/workflows/update-data.yml +++ b/.github/workflows/update-data.yml @@ -1,7 +1,6 @@ name: Update data on: - # Run every month on the 2nd at 18:30 UTC schedule: - cron: "30 18 2 * *" workflow_dispatch: @@ -9,73 +8,18 @@ on: paths: - ".github/workflows/update-data.yml" - "config.php" + - "data.csv" - "overpass/*" pull_request: paths: - ".github/workflows/update-data.yml" - "config.php" + - "data.csv" - "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/spain/bilbao - run: git checkout -q master - - name: Update sub-modules - run: git submodule update --remote --merge cities/spain/bilbao - - - name: Run update - working-directory: process - run: composer run update-data -- --city=spain/bilbao - - # - name: Upload artifact - # uses: actions/upload-artifact@v2 - # with: - # name: Bilbao - # path: cities/spain/bilbao/data/* - - - name: Commit sub-module - if: ${{ github.event_name != 'pull_request' }} - working-directory: cities/spain/bilbao - 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/spain/bilbao - 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/spain/bilbao - git commit -m "🗃 Update Bilbao 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 + uses: EqualStreetNames/equalstreetnames/.github/workflows/reusable-update-date.yml@master + secrets: inherit + with: + city: spain/bilbao