Skip to content

Merge branch 'main' of https://github.com/imkylecat/Silko #36

Merge branch 'main' of https://github.com/imkylecat/Silko

Merge branch 'main' of https://github.com/imkylecat/Silko #36

Workflow file for this run

name: Update Sileo Repo Indexes
on:
push:
branches: [ main ]
paths:
- 'debs/**'
- '.github/workflows/**'
workflow_dispatch: # lets you run it manually from Actions tab too
permissions:
contents: write # needed to commit the updated Packages/Release back
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # full history so git commit works nicely
- name: Generate Packages file
run: |
dpkg-scanpackages --arch iphoneos-arm debs > Packages || true
dpkg-scanpackages --arch iphoneos-arm64 debs >> Packages || true
dpkg-scanpackages --arch iphoneos-arm64e debs >> Packages || true
- name: Strip unwanted fields from Packages
run: |
sed -i '/^Header:/d; /^Icon:/d; /^SileoDepiction:/d; /^Native-Depiction:/d' Packages
- name: Compress to Packages.bz2 (Sileo prefers this)
run: bzip2 -k -f Packages # -k = keep original, -f = force overwrite
- name: (Optional) Update Release file hashes
run: |
# Simple static Release — you can make this dynamic if needed
cat > Release << EOF
Origin: Silko
Label: Silko
Suite: stable
Version: 1.0
Codename: ios
Architectures: iphoneos-arm iphoneos-arm64 iphoneos-arm64e
Components: main
Description: Personal repo with tweaks
Date: $(date -Ru)
EOF
# Add MD5/SHA256/SHA512 of Packages* with proper Debian format: hash size filename
echo "MD5Sum:" >> Release
for f in Packages Packages.bz2; do
hash=$(md5sum "$f" | awk '{print $1}')
size=$(wc -c < "$f" | tr -d ' ')
echo " ${hash} ${size} ${f}" >> Release
done
echo "SHA256:" >> Release
for f in Packages Packages.bz2; do
hash=$(sha256sum "$f" | awk '{print $1}')
size=$(wc -c < "$f" | tr -d ' ')
echo " ${hash} ${size} ${f}" >> Release
done
echo "SHA512:" >> Release
for f in Packages Packages.bz2; do
hash=$(sha512sum "$f" | awk '{print $1}')
size=$(wc -c < "$f" | tr -d ' ')
echo " ${hash} ${size} ${f}" >> Release
done
- name: Commit updated indexes back to repo
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add Packages Packages.bz2 Release || true
git commit -m "chore: update Packages & bz2 [ci skip]" || echo "No changes to commit"
git pull --rebase
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # built-in token works here