Create catalog.yml

This commit is contained in:
2025-09-03 13:51:17 -07:00
committed by GitHub
parent d997f9d70b
commit 80a727087d

18
.github/workflows/catalog.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
on: push
permissions:
contents: write
jobs:
c:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: >
printf '['>catalog.json;c=;
for f in *;do [ -f "$f" ]||continue;[ "${f:0:1}" = . ]&&continue;
printf '%s{"name":"%s","raw":"https://raw.githubusercontent.com/%s/%s/%s","content":"' "$c" "$f" "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" "$f">>catalog.json;
base64 -w0 "$f">>catalog.json;printf '"}'>>catalog.json;c=,;done;printf ']'
>>catalog.json;
git diff --quiet -- catalog.json||(
git add catalog.json;
git -c user.name=bot -c user.email=bot@users.noreply.github.com commit -m update;
git push )