Update .gitea/workflows/ci.yml
This commit is contained in:
@@ -31,7 +31,7 @@ jobs:
|
||||
|
||||
- name: Generate Skin Data Files
|
||||
id: generate_data
|
||||
shell: bash
|
||||
shell: bash # Changed to bash for array support and better process substitution
|
||||
run: |
|
||||
set -euo pipefail # Exit on error, unset variable, or pipeline failure
|
||||
|
||||
@@ -61,13 +61,13 @@ jobs:
|
||||
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
||||
"$GITEA_API/users/$user_login/repos?limit=50&page=1&_ts=$(date +%s)")
|
||||
|
||||
if ! echo "$repos_json" | jq -e '.[0]' >/dev/null; then
|
||||
if ! echo "$repos_json" | jq -e '.[0]' >/dev/null; then # Check if it's an empty array
|
||||
continue
|
||||
fi
|
||||
|
||||
mapfile -t repo_details < <(echo "$repos_json" | jq -r '.[] | .owner.login, .name, .html_url')
|
||||
|
||||
for ((i=0; i<${#repo_details[@]}; i+=3)); do
|
||||
for ((i=0; i<${#repo_details[@]}; i+=3)); do # THIS LOOP STARTS HERE
|
||||
owner="${repo_details[i]}"
|
||||
repo="${repo_details[i+1]}"
|
||||
html_url="${repo_details[i+2]}"
|
||||
@@ -121,7 +121,7 @@ jobs:
|
||||
else
|
||||
echo "README for $owner/$repo does not match required format" >&2
|
||||
fi
|
||||
done # End of for repo_details loop
|
||||
done # <--- ADDED THIS MISSING 'done' for the for ((i=0; i<${#repo_details[@]}; i+=3)) loop
|
||||
done # End of for user_logins loop
|
||||
page=$((page + 1))
|
||||
done # End of while users_data_found loop
|
||||
|
||||
Reference in New Issue
Block a user