File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,17 +68,16 @@ jobs:
6868 run : |
6969 dataset="${{ env.DATASET }}"
7070 echo "Syncing $dataset.json"
71- src_file=$(find "${GITHUB_WORKSPACE}/adamlui/python-utils" -name "$dataset.json" -type f | head -n 1)
72- if [[ -z "$src_file" ]] ; then echo "No source file found for $dataset" ; exit 1 ; fi
7371 snake_dataset=$(echo "$dataset" | tr '-' '_')
72+ src_file="${GITHUB_WORKSPACE}/adamlui/python-utils/src/$snake_dataset/$dataset.json"
73+ if [[ ! -f "$src_file" ]] ; then echo "No source file found for $dataset at $src_file" ; exit 1 ; fi
7474 dest_dir="${GITHUB_WORKSPACE}/adamlui/js-utils/$dataset"
7575 mkdir -p "$dest_dir"
7676 cp -f "$src_file" "$dest_dir/$dataset.json"
7777 COMMIT_MSG="${RAW_COMMIT_MSG:-Update $dataset.json} ↞ \
7878 [auto-sync from https://github.com/adamlui/python-utils/tree/main/$dataset]"
79- ESCAPED_MSG=$(printf '%q' "$COMMIT_MSG")
8079 cd "${GITHUB_WORKSPACE}/adamlui/js-utils"
81- git add "** /$dataset.json"
80+ git add "$dataset /$dataset.json"
8281 git commit -n -m "$COMMIT_MSG" || echo "Nothing to commit"
8382 git pull --rebase
8483 git push
You can’t perform that action at this time.
0 commit comments