diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml deleted file mode 100644 index 4166ff6..0000000 --- a/.github/workflows/automerge.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Check PR ok to automerge - -on: pull_request - -jobs: - perform-check: - runs-on: ubuntu-latest - steps: - - name: Check PR can be automerged - uses: hughrun/can-pr-be-automerged-action@v1.6 - with: - required-user: 'hughrun' diff --git a/.github/workflows/merge-csv-to-topojson.yml b/.github/workflows/merge-csv-to-topojson.yml index 70569cc..8ae0977 100644 --- a/.github/workflows/merge-csv-to-topojson.yml +++ b/.github/workflows/merge-csv-to-topojson.yml @@ -5,6 +5,7 @@ on: - master paths: - website/data/library_services_information.csv + workflow_dispatch: jobs: mergeData: runs-on: ubuntu-latest diff --git a/.github/workflows/update-topo-on-info-update.yml b/.github/workflows/update-topo-on-info-update.yml new file mode 100644 index 0000000..44cca5e --- /dev/null +++ b/.github/workflows/update-topo-on-info-update.yml @@ -0,0 +1,33 @@ +name: topo auto updater + +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 + steps: + + - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + + - uses: christianvuerings/add-labels@v1 + with: + labels: | + automated + data + + - 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