Skip to content

Test single change

Test single change #22

Workflow file for this run

name: List Modules in README.md
on:
push:
branches:
- main
jobs:
update-readme:
name: 📕 Update README.md
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v4
- name: 📖 Update README.md
run: |
set -euo pipefail
echo "# Test Packages" > README.md
echo "" >> README.md
for file in */module.json; do
if [ -f "$file" ]; then
title=$(jq -r '.title' "$file")
description=$(jq -r '.description' "$file")
module=$(dirname "$file")
url="https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/main/${module}/module.json"
echo "## $title" >> README.md
echo "" >> README.md
echo "$description" >> README.md
echo "" >> README.md
echo "$url" >> README.md
echo "" >> README.md
fi
done
for file in */system.json; do
if [ -f "$file" ]; then
title=$(jq -r '.title' "$file")
description=$(jq -r '.description' "$file")
system=$(dirname "$file")
url="https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/main/${system}/system.json"
echo "## $title" >> README.md
echo "" >> README.md
echo "$description" >> README.md
echo "" >> README.md
echo "$url" >> README.md
echo "" >> README.md
fi
done
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add README.md
if git diff --cached --quiet; then
echo "No README.md changes to commit."
else
git commit -m "chore: Update the list of packages in README.md (automated)"
git push
fi