From 968559d972c1e7be08ab2658cd2d24bece9fcd2b Mon Sep 17 00:00:00 2001 From: gwen windflower Date: Sat, 16 Mar 2024 09:06:04 -0500 Subject: [PATCH] Add correct data/ path to workflow yml --- .github/workflows/update.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 4579d4f..c87f4d6 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -22,19 +22,19 @@ jobs: uv pip install -r requirements.txt --system - name: Fetch latest data run: | - cp Street_Tree_List.csv Street_Tree_List-old.csv + cp data/Street_Tree_List.csv Street_Tree_List-old.csv curl -o Street_Tree_List-unsorted.csv "https://data.sfgov.org/api/views/tkzw-k3nq/rows.csv?accessType=DOWNLOAD" # Remove heading line and use it to start a new file - head -n 1 Street_Tree_List-unsorted.csv > Street_Tree_List.csv + head -n 1 Street_Tree_List-unsorted.csv > data/Street_Tree_List.csv # Sort all but the first line and append to that file - tail -n +2 "Street_Tree_List-unsorted.csv" | sort >> Street_Tree_List.csv + tail -n +2 "Street_Tree_List-unsorted.csv" | sort >> data/Street_Tree_List.csv # Generate commit message using csv-diff - csv-diff Street_Tree_List-old.csv Street_Tree_List.csv --key=TreeID --singular=tree --plural=trees > message.txt + csv-diff Street_Tree_List-old.csv data/Street_Tree_List.csv --key=TreeID --singular=tree --plural=trees > message.txt - name: Commit and push if it changed run: |- git config user.name "Automated" git config user.email "actions@users.noreply.github.com" - git add Street_Tree_List.csv + git add data/Street_Tree_List.csv timestamp=$(date -u) git commit -F message.txt || exit 0 git push