update all actions

- replaces the topo-updater with 2 separate actions: one for direct pushes and one for PRs
- updates tag names
This commit is contained in:
Hugh Rundle 2021-01-29 20:12:08 +11:00
parent d1192d1420
commit 4f3ef6963c
4 changed files with 29 additions and 34 deletions

View file

@ -1,26 +0,0 @@
name: Merge CSV to TopoJSON
on:
push:
branches:
- master
paths:
- website/data/library_services_information.csv
workflow_dispatch:
jobs:
mergeData:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Merge CSV to TopoJSON
run: |
python3 ./.github/scripts/merge_csv_to_topojson.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: update TopoJSON
title: Update TopoJSON
body: Update boundaries.topo.json with new data from library_services_information.csv
branch: auto-update-topo
labels: automated,data

View file

@ -28,4 +28,4 @@ jobs:
title: Update TopoJSON boundaries
body: 'Clean & minify GeoJSON; process to TopoJSON; merge library info csv to topo.'
branch: geo-to-topo
labels: automated,data
labels: auto update,data

View file

@ -4,11 +4,7 @@ on:
pull_request:
paths:
- website/data/library_services_information.csv
push:
branches:
- "master"
paths:
- website/data/library_services_information.csv
jobs:
auto-topo-updater:
runs-on: ubuntu-latest
@ -21,14 +17,15 @@ jobs:
- uses: christianvuerings/add-labels@v1
with:
labels: |
automated
auto update
data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Merge CSV to TopoJSON
run: |
python3 ./.github/scripts/merge_csv_to_topojson.py
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: merge csv into topo
commit_message: merge csv data to topo

View file

@ -0,0 +1,24 @@
name: topo auto updater
on:
push:
branches:
- "master"
paths:
- website/data/library_services_information.csv
jobs:
auto-topo-updater:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Merge CSV to TopoJSON
run: |
python3 ./.github/scripts/merge_csv_to_topojson.py
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: merge csv data to topo