mirror of
https://github.com/armbian/scripts.git
synced 2026-01-06 10:32:48 -08:00
Enable package repacking for Chromium, Firefox and Thunderbird (#44)
Signed-off-by: Igor <igor@armbian.com>
This commit is contained in:
14
.github/workflows/download-and-test-external.yml
vendored
14
.github/workflows/download-and-test-external.yml
vendored
@@ -123,7 +123,7 @@ jobs:
|
||||
run: |
|
||||
|
||||
find os/external/keys/ -type f -name "*.gpg" -exec gpg --import --no-default-keyring --keyring trustedkeys.gpg "{}" \;
|
||||
sudo apt-get -y install debian-keyring ubuntu-keyring
|
||||
sudo apt-get -y install debian-keyring ubuntu-keyring devscripts
|
||||
gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 0E98404D386FA1D9
|
||||
|
||||
- name: Download
|
||||
@@ -182,6 +182,18 @@ jobs:
|
||||
find $SOURCE -type f -name "chromium-codecs-ffmpeg_*" | sort | head -n -2 | xargs sudo rm || true
|
||||
find $SOURCE -type f -name "chromium-codecs-ffmpeg-extra_*" | sort | head -n -2 | xargs sudo rm || true
|
||||
|
||||
# repack deb files
|
||||
DEBS=($(find "${SOURCE}"* -type f -name "thunderbird_*.deb" -o -name "firefox_*.deb" -o -name "chromium*.deb"))
|
||||
for d in ${DEBS[@]}; do
|
||||
echo $d
|
||||
# BEFORE=$(deb-reversion -c ${d} -s armbian)
|
||||
# add epoch 9
|
||||
#AFTER=9:$(echo $BEFORE | cut -d":" -f2)
|
||||
#echo "$d : $BEFORE -> $AFTER"
|
||||
#sudo DEBEMAIL=info@armbian.com deb-reversion -v $AFTER -s armbian $d
|
||||
#sudo rm $d
|
||||
done
|
||||
|
||||
if [[ ${TARGET} == main ]]; then
|
||||
if grep -qE 'B' <<< "$REPOSITORY"; then find $SOURCE -type f -name "*.deb" -exec cp {} build/output/debs-beta/ \;; fi
|
||||
if grep -qE 'S' <<< "$REPOSITORY"; then find $SOURCE -type f -name "*.deb" -exec cp {} build/output/debs/ \;; fi
|
||||
|
||||
46
packages/packages-remove.sh
Normal file
46
packages/packages-remove.sh
Normal file
@@ -0,0 +1,46 @@
|
||||
# You need admin:org token capabilities
|
||||
# NAME = tag you want to delete from all runners
|
||||
# DELETE = runner you want to delete from the pool
|
||||
|
||||
TOKEN=
|
||||
ORG="orgs/armbian"
|
||||
#ORG="user"
|
||||
x=1
|
||||
while [ $x -le 51 ] # need to do it different as it can be more then 9 pages
|
||||
do
|
||||
RUNNER=$(
|
||||
curl -L \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Authorization: Bearer $TOKEN"\
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
"https://api.github.com/${ORG}/packages?package_type=container&page=${x}" | jq -r '.[].name' | xargs -n1 -d'\n' | sed 's/\//%2F/g' | sed -e 's/ /,/g'
|
||||
)
|
||||
|
||||
while IFS= read -r DATA; do
|
||||
|
||||
RUNNER_ID=$(echo $DATA | cut -d"," -f1)
|
||||
#RUNNER_NAME=$(echo $DATA | cut -d"," -f2)
|
||||
echo $RUNNER_ID
|
||||
if [[ $RUNNER_ID == cache* ]]; then
|
||||
echo "PKG to remove: $RUNNER_ID"
|
||||
curl -L \
|
||||
-X DELETE \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer $TOKEN"\
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
"https://api.github.com/${ORG}/packages/container/${RUNNER_ID}"
|
||||
fi
|
||||
|
||||
# deleting a runner
|
||||
#if [[ $RUNNER_NAME == ${DELETE} ]]; then
|
||||
#curl -L \
|
||||
# -X DELETE \
|
||||
# -H "Accept: application/vnd.github+json" \
|
||||
# -H "Authorization: Bearer ${TOKEN}"\
|
||||
# -H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
# https://api.github.com/orgs/${ORG}/actions/runners/${RUNNER_ID}
|
||||
#fi
|
||||
|
||||
done <<< $RUNNER
|
||||
x=$(( $x + 1 ))
|
||||
done
|
||||
Reference in New Issue
Block a user