diff --git a/.github/workflows/schools_updater.yml b/.github/workflows/schools_updater.yml index d26f557..e40742a 100644 --- a/.github/workflows/schools_updater.yml +++ b/.github/workflows/schools_updater.yml @@ -70,7 +70,11 @@ jobs: - name: Filter JSON to only include school names and save as school.csv run: | # Add first line to CSV file - echo "\"Below is a list of all schools that we've manually verified. If you see one that hasn't been included, please add it via my.mlh.io and we'll verify it soon.\"" > schools.csv + CURRENT_TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S") + echo "\"Below is a list of all schools that we've manually verified. If you see one that hasn't been included, please add it via my.mlh.io and we'll verify it soon. List last updated at: $CURRENT_TIMESTAMP.\"" > schools.csv + + # Extract only the "name" field from each entry and overwrite data.json + jq -r '.[].name' data.json >> schools.csv # Wrap each "name" in an array to use @csv for correct CSV formatting jq -r '.[].name | [.] | @csv' data.json >> schools.csv