-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise any errors to the GH Action
- Loading branch information
Showing
1 changed file
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,19 @@ jobs: | |
|
||
- name: Get data and update file | ||
run: | | ||
OUTPUT="$(node ./utils/GenerateLatestData.js)" | ||
if [ -n "$OUTPUT" ]; then | ||
OUTPUT="$(node ./utils/GenerateLatestData.js 2>err.txt)" | ||
FILE="err.txt" | ||
if [[ -f "$FILE" ]]; then | ||
# Read the file contents and echo them so they are captured by the GitHub Actions runner | ||
while read -r line; do | ||
echo "$line" | ||
done < "$FILE" | ||
# Delete the file | ||
rm "$FILE" | ||
echo "File $FILE has been deleted." | ||
exit 1 | ||
elif [ -n "$OUTPUT" ]; then | ||
echo "$OUTPUT" > ./website/public/data/latest.json | ||
git config --local user.email "[email protected]" | ||
|