Update update-cache.yml

This commit is contained in:
Igor Pečovnik
2022-08-09 10:13:48 +02:00
committed by GitHub
parent e22614d074
commit eff7ea1ee0

View File

@@ -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' }}