File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 run : |
4444 SHA="${{ github.sha }}"
4545 REPO="${{ github.repository }}"
46- changed_file=$(gh api repos/$REPO/commits/$SHA | grep -oP '"filename":\s*"\K[^"]+' | grep '\.json$' | head -n 1)
46+ changed_file=$(gh api repos/$REPO/commits/$SHA \
47+ | grep -oP '"filename":\s*"\K[^"]+' \
48+ | grep '\.json$' \
49+ | head -n 1)
4750 changed_file="${changed_file//%2F//}" # decode URL-encoded slashes (%2F → /)
4851 changed_file="${changed_file%%\?*}" # remove any query string (?ref=...)
4952 dataset=$(basename "$changed_file" .json)
7376 dest_dir="${GITHUB_WORKSPACE}/adamlui/js-utils/$dataset"
7477 mkdir -p "$dest_dir"
7578 cp -f "$src_file" "$dest_dir/$dataset.json"
76- COMMIT_MSG="${RAW_COMMIT_MSG:-Update $dataset.json} ↞ [auto-sync from https://github.com/adamlui/python-utils/tree/main/$dataset]"
79+ COMMIT_MSG="${RAW_COMMIT_MSG:-Update $dataset.json} ↞ \
80+ [auto-sync from https://github.com/adamlui/python-utils/tree/main/$dataset]"
7781 ESCAPED_MSG=$(printf '%q' "$COMMIT_MSG")
7882 cd "${GITHUB_WORKSPACE}/adamlui/js-utils"
7983 git add "$dataset/$dataset.json"
You can’t perform that action at this time.
0 commit comments