From 2c3cd34cd307980558af153585cd133d66b20fe5 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Fri, 5 Feb 2021 21:20:02 +1100 Subject: [PATCH] update workflows - PR are now only tagged - topo merge is done on push to master, not as part of PR - this should resolve problems with arbitrary forked branches --- .github/workflows/tag-prs.yml | 22 +++++++++++++++++++ ...on-info-pr.yml => update-topo-on-push.yml} | 19 +++++++--------- 2 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/tag-prs.yml rename .github/workflows/{update-topo-on-info-pr.yml => update-topo-on-push.yml} (58%) diff --git a/.github/workflows/tag-prs.yml b/.github/workflows/tag-prs.yml new file mode 100644 index 0000000..a4beb65 --- /dev/null +++ b/.github/workflows/tag-prs.yml @@ -0,0 +1,22 @@ +name: tag PRs + +on: + pull_request: + paths: + - 'website/data/*' + + workflow_dispatch: + +jobs: + auto-topo-updater: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v2 + + - uses: christianvuerings/add-labels@v1 + with: + labels: | + data + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-topo-on-info-pr.yml b/.github/workflows/update-topo-on-push.yml similarity index 58% rename from .github/workflows/update-topo-on-info-pr.yml rename to .github/workflows/update-topo-on-push.yml index c28d029..c8e9af8 100644 --- a/.github/workflows/update-topo-on-info-pr.yml +++ b/.github/workflows/update-topo-on-push.yml @@ -1,9 +1,11 @@ -name: topo auto updater (PR) +name: topo update (push) on: - pull_request: + push: + branches: + - 'master' paths: - - 'website/data/library_services_information.csv' + - 'website/data/library_services_information.csv' workflow_dispatch: @@ -13,15 +15,10 @@ jobs: steps: - uses: actions/checkout@v2 - - - uses: christianvuerings/add-labels@v1 with: - labels: | - auto update - data - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + ref: ${{ github.head_ref }} + fetch-depth: 0 + - name: Merge CSV to TopoJSON run: | python3 ./.github/scripts/merge_csv_to_topojson.py