Skip to content

build(deps): bump the github-actions-all group across 1 directory wit… #823

build(deps): bump the github-actions-all group across 1 directory wit…

build(deps): bump the github-actions-all group across 1 directory wit… #823

# yamllint disable rule:line-length
---
name: taskfile-sorted-units
"on":
push:
permissions:
contents: read
jobs:
taskfile-sorted-units:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false
- run: |
check_sorted() {
local task_name="$1"
local keys
keys=$(yq e ".tasks.\"$task_name\" | keys | select(. != null)" ./build/task.yml | sed 's/^- //g')
if [[ "$keys" != "$(echo "$keys" | sort)" ]]; then
echo "❌ Keys are not sorted in $task_name"
echo "Expected:"
echo "$keys" | sort
echo
echo "Found:"
echo "$keys"
exit 1
fi
}
for task in $(yq e '.tasks | keys' ./build/task.yml | sed 's/^- //g'); do
check_sorted "${task}"
done
echo "✅ All tasks have sorted keys!"