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:
16
.github/workflows/daily_README.yaml
vendored
16
.github/workflows/daily_README.yaml
vendored
@@ -88,18 +88,6 @@ jobs:
|
||||
ICON=""
|
||||
fi
|
||||
|
||||
# Number of users
|
||||
DOWNLOADS=0
|
||||
COUNT=0
|
||||
ARCH=amd64 && SLUG=$(jq -r '.image' "$f/config.json" | awk -F 'alexbelgium/|-{arch' '{print $2}') && \
|
||||
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}')" && \
|
||||
DOWNLOADS=$(( $DOWNLOADS + $COUNT))
|
||||
echo "$DOWNLOADS amd64 users"
|
||||
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"
|
||||
DOWNLOADS=$(( $DOWNLOADS + $COUNT))
|
||||
|
||||
# Write infos
|
||||
sed -i "$ADDONSLINE"'{G;}' README2.md
|
||||
if [[ $(jq '.schema' "$f/config.json") == *"localdisks"* ]]; then sed -i "$ADDONSLINE"'a ![localdisks][localdisks-badge]' README2.md; fi
|
||||
@@ -116,12 +104,12 @@ jobs:
|
||||
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 armv7 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 armv7 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