Skip to content

Commit 02de3fa

Browse files
committed
Changed paths
1 parent 7397c24 commit 02de3fa

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/sync-dataset-json-changes-to-js-utils.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)