From 4f3ef6963c146cd60e29729d263ff003342b87e6 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Fri, 29 Jan 2021 20:12:08 +1100 Subject: [PATCH] update all actions - replaces the topo-updater with 2 separate actions: one for direct pushes and one for PRs - updates tag names --- .github/workflows/merge-csv-to-topojson.yml | 26 ------------------- .github/workflows/minify-map-json.yml | 2 +- ...-update.yml => update-topo-on-info-pr.yml} | 11 +++----- .../workflows/update-topo-on-info-push.yml | 24 +++++++++++++++++ 4 files changed, 29 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/merge-csv-to-topojson.yml rename .github/workflows/{update-topo-on-info-update.yml => update-topo-on-info-pr.yml} (77%) create mode 100644 .github/workflows/update-topo-on-info-push.yml diff --git a/.github/workflows/merge-csv-to-topojson.yml b/.github/workflows/merge-csv-to-topojson.yml deleted file mode 100644 index 8ae0977..0000000 --- a/.github/workflows/merge-csv-to-topojson.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/minify-map-json.yml b/.github/workflows/minify-map-json.yml index 8e82111..c7893b5 100644 --- a/.github/workflows/minify-map-json.yml +++ b/.github/workflows/minify-map-json.yml @@ -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 diff --git a/.github/workflows/update-topo-on-info-update.yml b/.github/workflows/update-topo-on-info-pr.yml similarity index 77% rename from .github/workflows/update-topo-on-info-update.yml rename to .github/workflows/update-topo-on-info-pr.yml index 454c9e4..179684f 100644 --- a/.github/workflows/update-topo-on-info-update.yml +++ b/.github/workflows/update-topo-on-info-pr.yml @@ -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 \ No newline at end of file + commit_message: merge csv data to topo \ No newline at end of file diff --git a/.github/workflows/update-topo-on-info-push.yml b/.github/workflows/update-topo-on-info-push.yml new file mode 100644 index 0000000..bfba16c --- /dev/null +++ b/.github/workflows/update-topo-on-info-push.yml @@ -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 \ No newline at end of file