diff --git a/.github/workflows/station-check.yml b/.github/workflows/station-check.yml index 912fb7c..461e442 100644 --- a/.github/workflows/station-check.yml +++ b/.github/workflows/station-check.yml @@ -3,9 +3,12 @@ name: Station CSV Check on: workflow_dispatch: push: + branches: + - main paths: - "resource/station-dev.csv" pull_request: + types: [opened, synchronize, reopened] paths: - "resource/station-dev.csv" @@ -35,12 +38,12 @@ jobs: run: bun run scripts/station-check.ts - name: Copy station-dev.csv to station.csv - if: success() + if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main' run: | cp resource/station-dev.csv resource/station.csv - name: Commit and push changes - if: success() && github.event_name == 'push' && github.ref_name == 'main' + if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main' env: PAT_TOKEN: ${{ secrets.PAT_TOKEN }} run: | diff --git a/resource/station-dev.csv b/resource/station-dev.csv index e6bc2f2..7ca7014 100644 --- a/resource/station-dev.csv +++ b/resource/station-dev.csv @@ -1,5 +1,5 @@ loc_code,id,lat,lon,floor,code,net,time,work -1,126E0A8,23.2,121.23,1,711,3,2025-12-12,1 +1,126E0A8,23.23,121.23,1,711,3,2025-12-12,1 2,4812424,24.6658,121.7695,1,269,2,2023-11-27,1 3,11339620,24.9292,121.3168,1,335,2,2023-11-27,1 4,11370676,23.862,120.7991,1,541,2,2023-11-27,1 @@ -184,4 +184,4 @@ loc_code,id,lat,lon,floor,code,net,time,work 183,6759352,23.5767,121.3626,1,979,1,2023-11-27,1 184,11339360,23.3466,121.3443,1,981,1,2023-11-27,1 185,11334552,23.3329,121.319,1,981,1,2023-11-27,1 -186,15826108,23.2766,121.3344,1,983,1,2024-05-29,1 \ No newline at end of file +186,15826108,23.2766,121.3344,1,983,1,2024-05-29,1