mirror of
https://github.com/armbian/scripts.git
synced 2026-01-06 10:32:48 -08:00
Update update-cache.yml
This commit is contained in:
23
.github/workflows/update-cache.yml
vendored
23
.github/workflows/update-cache.yml
vendored
@@ -138,6 +138,14 @@ jobs:
|
||||
path: trackerslist
|
||||
clean: false
|
||||
|
||||
- name: Import GPG key
|
||||
uses: crazy-max/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_KEY1 }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE1 }}
|
||||
workdir: build
|
||||
git_user_signingkey: true
|
||||
|
||||
- name: Copy templates
|
||||
run: |
|
||||
|
||||
@@ -256,6 +264,21 @@ jobs:
|
||||
cd ..
|
||||
ls -l build/cache/rootfs || true
|
||||
|
||||
|
||||
- name: Signing
|
||||
run: |
|
||||
|
||||
sudo apt-get -y -qq install parallel buildtorrent
|
||||
ANNOUNCE=$(cat trackerslist/trackers_best_ip.txt | head -1)ANNOUNCE=$(cat trackerslist/trackers_best_ip.txt | sed '/^$/d' | shuf -n 1)
|
||||
TRACKERS=$(cat trackerslist/trackers_all.txt | sed '/^\s*$/d' | while read line; do printf ",""${line}"; done | cut -c 2-)
|
||||
WEBSEEDS="--webseeds="https://github.com/armbian/cache/releases/download/${{ needs.release-start.outputs.rootfscache_version }}/\$FILE,"$(curl -s https://cache.armbian.com/mirrors | jq -r '.'default' | .[] | values' | sed -e 's/$/rootfs\/${{ needs.release-start.outputs.rootfscache_version }}\/$FILE/' | tr '\n' , | sed 's/.$//')"
|
||||
cd build/cache/rootfs.upload/${{ needs.release-start.outputs.rootfscache_version }}
|
||||
TARGET=$(ls -1 *.lz4)
|
||||
echo "Signing"
|
||||
echo ${{ secrets.GPG_PASSPHRASE1 }} | gpg --quiet --armor --batch --yes --passphrase-fd 0 --detach-sign --pinentry-mode loopback *.lz4
|
||||
echo "Torrent"
|
||||
buildtorrent -q -s -m '$WEBSEEDS' --announce="'$ANNOUNCE'" --announcelist="'$TRACKERS'" $TARGET -c "Armbian rootfs cache" ${TARGET}.torrent >/dev/null
|
||||
|
||||
- name: Upload
|
||||
uses: ncipollo/release-action@v1
|
||||
if: ${{ github.repository_owner == 'Armbian' }}
|
||||
|
||||
Reference in New Issue
Block a user