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