This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
bruh bruh #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PackageBot | |
on: | |
push: | |
branches: ["repo"] | |
schedule: | |
- cron: "0 * * * *" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- name: Update Unstable on Repo | |
shell: bash | |
run: | | |
git pull | |
gh release -R pbskids-dl/pbskids-dl download unstable --pattern '*.deb' | |
gh release -R pbskids-dl/pbskids-dl.rs download unstable --pattern '*.deb' | |
rm ./pool/main/unstable/pbskids-dl.rs*.deb | |
rm ./pool/main/unstable/pbskids-dl_unstable-1_all.deb | |
mv pbskids-dl_debian.deb ./pool/main/unstable/pbskids-dl_unstable-1_all.deb | |
mv pbskids-dl.rs*.deb ./pool/main/unstable | |
./generate-packages-unstable.sh | |
cd ./dists/unstable | |
rm Release.gpg | |
./generate-release.sh > Release | |
cd ../.. | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Update Stable on Repo | |
shell: bash | |
run: | | |
git pull | |
gh release -R pbskids-dl/pbskids-dl download --pattern '*.deb' | |
gh release -R pbskids-dl/pbskids-dl.rs download --pattern '*.deb' | |
DEB_VERSION=`curl -s https://raw.githubusercontent.com/pbskids-dl/pbskids-dl_debian/build/version` | |
mv pbskids-dl_debian.deb ./pool/main/stable/pbskids-dl_$DEB_VERSION-1_all.deb || true | |
mv pbskids-dl.rs*.deb ./pool/main/stable/ || true | |
./generate-packages.sh | |
cd ./dists/stable | |
rm Release.gpg | |
./generate-release.sh > Release | |
cd ../.. | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Import GPG keys | |
run: | | |
mkdir tmp | |
cd tmp | |
echo "${{ secrets.GPG_PUBLIC_KEY }}" > gpg-pub.asc | |
echo "${{ secrets.GPG_PRIVATE_KEY }}" > gpg-priv.asc | |
gpg --import gpg-pub.asc | |
gpg --batch --yes --pinentry-mode=loopback --import gpg-priv.asc | |
rm -rf ./tmp | |
- name: Sign Release | |
run: | |
| | |
cd ./dists/stable | |
gpg --batch --yes --pinentry-mode=loopback -abs -u 5C5D62C723FB06AE54235F095226D68386FBF13E -o Release.gpg Release | |
cd ../.. | |
cd ./dists/unstable | |
gpg --batch --yes --pinentry-mode=loopback -abs -u 5C5D62C723FB06AE54235F095226D68386FBF13E -o Release.gpg Release | |
cd ../.. | |
- name: Commit | |
run: | |
| | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git add . | |
git commit -m "[PackageBot] Update Packages" || true | |
git push |