Just set it up for the mirrors
Some checks are pending
Hasher / generate-metadata (push) Waiting to run

This commit is contained in:
chersbobers 2026-05-13 17:32:31 +12:00
commit 3d4491a771
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,32 @@
name: Hasher
on: [push]
jobs:
generate-metadata:
runs-on: docker
steps:
- uses: actions/checkout@v3
- name: Build Manifest
run: |
echo '{"packages": [' > packages.json
DIRS=$(find . -maxdepth 1 -type d -not -path '*/.*' -not -path '.')
FIRST=true
for DIR in $DIRS; do
PKG=$(basename "$DIR")
if [ -f "$DIR/$PKG.c" ]; then
sha256sum "$DIR/$PKG.c" | cut -d ' ' -f 1 > "$DIR/$PKG.hash"
if [ "$FIRST" = false ]; then echo "," >> packages.json; fi
echo "{\"name\": \"$PKG\", \"version\": \"1.0.0\"}" >> packages.json
FIRST=false
fi
done
echo ']}' >> packages.json
- name: Deploy Changes
run: |
git config --local user.email "hasher@forgejo.internal"
git config --local user.name "Hasher Bot"
git add .
git commit -m "hasher: auto-update" || exit 0
git push

3
package.json Normal file
View file

@ -0,0 +1,3 @@
{
"packages": []
}