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:
59
.github/workflows/update-cache.yml
vendored
59
.github/workflows/update-cache.yml
vendored
@@ -339,8 +339,8 @@ jobs:
|
||||
cat filename.cache
|
||||
cat arch.cache
|
||||
echo ${{ inputs.variant }}
|
||||
ls -1 build/cache/rootfs.upload/$(cat version.cache)/$(cat arch.cache)*.zst | awk -F/ '{print $(NF-1)"/"$NF}'
|
||||
MATRIX=$(ls -1 build/cache/rootfs.upload/$(cat version.cache)/$(cat arch.cache)*.zst | awk -F/ '{print $(NF-1)"/"$NF}')
|
||||
#ls -1 build/cache/rootfs.upload/$(cat version.cache)/$(cat arch.cache)*.zst | awk -F/ '{print $(NF-1)"/"$NF}'
|
||||
MATRIX=$(ls -1 build/cache/rootfs.upload/$(cat version.cache)/$(cat arch.cache)*.zst | awk -F/ '{print $NF}')
|
||||
echo ::set-output name=files::$(for x in $(echo "${MATRIX}"); do echo $x; done|jq -cnR '[inputs | select(length>0)]' | jq)
|
||||
|
||||
sign:
|
||||
@@ -380,11 +380,11 @@ jobs:
|
||||
|
||||
if [[ $(curl -s http://ifconfig.me) == "93.103.15.56" || $(curl -s http://ifconfig.me) == "46.19.33.90" ]]; then
|
||||
echo "Mounting NFS share"
|
||||
sudo mount nas:/tank/armbian/users.armbian.com/upload/rootfs build/cache/rootfs.upload
|
||||
sudo mount nas:/tank/armbian/users.armbian.com/upload/rootfs/$(cat version.cache) build/cache/rootfs.upload
|
||||
else
|
||||
echo "Mounting SSH share"
|
||||
sudo sshfs upload@users.armbian.com:/rootfs build/cache/rootfs.upload -o IdentityFile=~/.ssh/id_rsa -o reconnect -o allow_other || true
|
||||
sudo sshfs upload@users.armbian.com:/rootfs build/cache/rootfs.upload -o IdentityFile=~/.ssh/id_rsa -o reconnect -o nonempty,allow_other || true
|
||||
sudo sshfs upload@users.armbian.com:/rootfs/$(cat version.cache) build/cache/rootfs.upload -o IdentityFile=~/.ssh/id_rsa -o reconnect -o allow_other || true
|
||||
sudo sshfs upload@users.armbian.com:/rootfs/$(cat version.cache) build/cache/rootfs.upload -o IdentityFile=~/.ssh/id_rsa -o reconnect -o nonempty,allow_other || true
|
||||
fi
|
||||
|
||||
- name: Signining and torrent creation
|
||||
@@ -393,29 +393,28 @@ jobs:
|
||||
|
||||
sudo apt-get -y -qq install jq parallel buildtorrent
|
||||
|
||||
echo ${{ matrix.node }}
|
||||
ls -l build/cache/rootfs.upload
|
||||
|
||||
# FILE=$(ls -1 build/cache/rootfs/${{ matrix.node }} | awk -F/ '{print $NF}')
|
||||
# ANNOUNCE=$(cat trackerslist/trackers_best_ip.txt | sed '/^$/d' | shuf -n 1)
|
||||
# TRACKERS=$(cat trackerslist/trackers_best_ip.txt | sed '/^\s*$/d' | while read line; do printf ",""${line}"; done | cut -c 2-)
|
||||
# WEBSEEDS="--webseeds="https://github.com/armbian/cache/releases/download/${{ needs.Prepare.outputs.rootfscache_version }}/$FILE,"$(curl -s https://cache.armbian.com/mirrors | jq -r '.'default' | .[] | values' | sed -e 's/$/rootfs\/'${{ needs.Prepare.outputs.rootfscache_version }}'\/'$FILE'/' | tr '\n' , | sed 's/.$//')"
|
||||
# cd build/cache/rootfs
|
||||
# rm -f *.current
|
||||
# #TARGET=$(ls -1 *.zst)
|
||||
# echo "Sign"
|
||||
# echo ${{ secrets.GPG_PASSPHRASE1 }} | gpg --quiet --armor --batch --yes --passphrase-fd 0 --detach-sign --pinentry-mode loopback ${FILE}
|
||||
# echo "Generate torrent"
|
||||
# buildtorrent $WEBSEEDS --announce=$ANNOUNCE --announcelist=$TRACKERS $FILE -c "Armbian rootfs cache" ${FILE}.torrent
|
||||
#echo ${{ matrix.node }}
|
||||
FILE=${{ matrix.node }}
|
||||
#ls -l build/cache/rootfs.upload/$(cat version.cache)/${{ matrix.node }}
|
||||
|
||||
# - name: Upload
|
||||
# uses: ncipollo/release-action@v1
|
||||
# if: ${{ github.repository_owner == 'Armbian' }}
|
||||
# with:
|
||||
# artifacts: "build/cache/rootfs/*"
|
||||
# artifactErrorsFailBuild: true
|
||||
# tag: "${{ needs.Prepare.outputs.rootfscache_version }}"
|
||||
# omitBody: true
|
||||
# omitName: true
|
||||
# allowUpdates: true
|
||||
# token: ${{ secrets.PAT1 }}
|
||||
# FILE=$(ls -1 build/cache/rootfs/${{ matrix.node }} | awk -F/ '{print $NF}')
|
||||
ANNOUNCE=$(cat trackerslist/trackers_best_ip.txt | sed '/^$/d' | shuf -n 1)
|
||||
TRACKERS=$(cat trackerslist/trackers_best_ip.txt | sed '/^\s*$/d' | while read line; do printf ",""${line}"; done | cut -c 2-)
|
||||
WEBSEEDS="--webseeds="https://github.com/armbian/cache/releases/download/${{ needs.Prepare.outputs.rootfscache_version }}/$FILE,"$(curl -s https://cache.armbian.com/mirrors | jq -r '.'default' | .[] | values' | sed -e 's/$/rootfs\/'${{ needs.Prepare.outputs.rootfscache_version }}'\/'$FILE'/' | tr '\n' , | sed 's/.$//')"
|
||||
cd build/cache/rootfs.upload
|
||||
echo "Sign"
|
||||
echo ${{ secrets.GPG_PASSPHRASE1 }} | gpg --quiet --armor --batch --yes --passphrase-fd 0 --detach-sign --pinentry-mode loopback ${FILE}
|
||||
echo "Generate torrent"
|
||||
buildtorrent $WEBSEEDS --announce=$ANNOUNCE --announcelist=$TRACKERS $FILE -c "Armbian rootfs cache" ${FILE}.torrent
|
||||
|
||||
- name: Upload
|
||||
uses: ncipollo/release-action@v1
|
||||
if: ${{ github.repository_owner == 'Armbian' }}
|
||||
with:
|
||||
artifacts: "build/cache/rootfs/*.asc"
|
||||
artifactErrorsFailBuild: true
|
||||
tag: "${{ needs.Prepare.outputs.rootfscache_version }}"
|
||||
omitBody: true
|
||||
omitName: true
|
||||
allowUpdates: true
|
||||
token: ${{ secrets.PAT1 }}
|
||||
|
||||
Reference in New Issue
Block a user