mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 18:31:02 +01:00
Update daily_README.yaml
This commit is contained in:
9
.github/workflows/daily_README.yaml
vendored
9
.github/workflows/daily_README.yaml
vendored
@@ -15,6 +15,9 @@ jobs:
|
||||
run: |
|
||||
# Init
|
||||
echo "Starting"
|
||||
|
||||
declare -i DOWNLOADS
|
||||
declare -i COUNT
|
||||
|
||||
# Go through all folders, add to filters if not existing
|
||||
for f in $( find -- * -maxdepth 0 -type d | sort -r ); do
|
||||
@@ -99,17 +102,17 @@ jobs:
|
||||
if [[ $(jq '.arch[]' "$f/config.json") == *"armv7"* ]]; then
|
||||
sed -i "$ADDONSLINE"'a ![armv7][armv7-badge]' README2.md
|
||||
ARCH=armv7 && COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')"
|
||||
echo "$COUNT armv7 users with $SLUG" && DOWNLOADS=$(( $DOWNLOADS + $COUNT))
|
||||
echo "$COUNT armv7 users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))"
|
||||
else sed -i "$ADDONSLINE"'a ![armv7no][armv7no-badge]' README2.md; fi
|
||||
if [[ $(jq '.arch[]' "$f/config.json") == *"amd64"* ]]; then
|
||||
sed -i "$ADDONSLINE"'a ![amd64][amd64-badge]' README2.md
|
||||
ARCH=amd64 && COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')"
|
||||
echo "$COUNT amd64 users with $SLUG" && DOWNLOADS=$(( $DOWNLOADS + $COUNT))
|
||||
echo "$COUNT amd64 users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))"
|
||||
else sed -i "$ADDONSLINE"'a ![amd64no][amd64no-badge]' README2.md; fi
|
||||
if [[ $(jq '.arch[]' "$f/config.json") == *"aarch64"* ]]; then
|
||||
sed -i "$ADDONSLINE"'a ![aarch64][aarch64-badge]' README2.md
|
||||
ARCH=aarch64 && COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')"
|
||||
echo "$COUNT aarch64 users with $SLUG" && DOWNLOADS=$(( $DOWNLOADS + $COUNT))
|
||||
echo "$COUNT aarch64 users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))"
|
||||
else sed -i "$ADDONSLINE"'a ![aarch64no][aarch64no-badge]' README2.md; fi
|
||||
if [[ -f "$f/updater.json" ]]; then sed -i "$ADDONSLINE"'a ' README2.md; fi
|
||||
sed -i "$ADDONSLINE"'a   ' README2.md || true
|
||||
|
||||
Reference in New Issue
Block a user