mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Use latest
This commit is contained in:
16
.github/workflows/daily_README.yaml
vendored
16
.github/workflows/daily_README.yaml
vendored
@@ -8,7 +8,7 @@ on:
|
||||
jobs:
|
||||
README_updater:
|
||||
if: github.repository_owner == 'alexbelgium'
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
mv "$f" "$NAME"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
# Populate template
|
||||
@@ -45,19 +45,19 @@ jobs:
|
||||
find -- * -maxdepth 0 -type d | sort -r | while read -r f; do
|
||||
# $f is an addon directory
|
||||
if [ -f "$f/config.json" ]; then
|
||||
|
||||
|
||||
echo "Project $f"
|
||||
|
||||
|
||||
# Get variables
|
||||
if [ -f "$f/oldname" ]; then FOLDERNAME="$(cat "$f/oldname")"; else FOLDERNAME="$f"; fi
|
||||
NAME="$(jq -r '.name' "$f/config.json")"
|
||||
DESCRIPTION="$(jq -r '.description' "$f/config.json")"
|
||||
# Get icon
|
||||
if [ "$(jq '.panel_icon' "$f/config.json")" != null ]; then
|
||||
if [ "$(jq '.panel_icon' "$f/config.json")" != null ]; then
|
||||
ICON="$(jq -r '.panel_icon' "$f/config.json")"
|
||||
ICON="${ICON#*:}"
|
||||
ICON=""
|
||||
else
|
||||
else
|
||||
ICON=""
|
||||
fi
|
||||
|
||||
@@ -73,10 +73,10 @@ jobs:
|
||||
if [[ "$(jq '.arch[]' "$f/config.json")" == *"armv7"* ]]; then
|
||||
sed -i "$ADDONSLINE"'a ![armv7][armv7-badge]' README2.md
|
||||
else sed -i "$ADDONSLINE"'a ![armv7no][armv7no-badge]' README2.md; fi || true
|
||||
if [[ "$(jq '.arch[]' "$f/config.json")" == *"amd64"* ]]; then
|
||||
if [[ "$(jq '.arch[]' "$f/config.json")" == *"amd64"* ]]; then
|
||||
sed -i "$ADDONSLINE"'a ![amd64][amd64-badge]' README2.md
|
||||
else sed -i "$ADDONSLINE"'a ![amd64no][amd64no-badge]' README2.md; fi || true
|
||||
if [[ "$(jq '.arch[]' "$f/config.json")" == *"aarch64"* ]]; then
|
||||
if [[ "$(jq '.arch[]' "$f/config.json")" == *"aarch64"* ]]; then
|
||||
sed -i "$ADDONSLINE"'a ![aarch64][aarch64-badge]' README2.md
|
||||
else sed -i "$ADDONSLINE"'a ![aarch64no][aarch64no-badge]' README2.md; fi || true
|
||||
if [[ -f "$f/updater.json" ]]; then sed -i "$ADDONSLINE"'a ' README2.md; fi
|
||||
|
||||
2
.github/workflows/on_issues.yml
vendored
2
.github/workflows/on_issues.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
|
||||
jobs:
|
||||
ISSUES_linked:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
2
.github/workflows/weekly_sortjson.yaml
vendored
2
.github/workflows/weekly_sortjson.yaml
vendored
@@ -10,7 +10,7 @@ on:
|
||||
jobs:
|
||||
sort_json:
|
||||
if: github.repository_owner == 'alexbelgium'
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
6
.github/workflows/weekly_stats.yaml
vendored
6
.github/workflows/weekly_stats.yaml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
jobs:
|
||||
stats_updater:
|
||||
if: github.repository_owner == 'alexbelgium'
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
@@ -45,14 +45,14 @@ jobs:
|
||||
COUNT1="$COUNT"
|
||||
echo "$COUNT $ARCH users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))"
|
||||
else COUNT1="-"; fi
|
||||
if [[ "$(jq '.arch[]' "$f/config.json")" == *"amd64"* ]]; then
|
||||
if [[ "$(jq '.arch[]' "$f/config.json")" == *"amd64"* ]]; then
|
||||
ARCH=amd64 && COUNT="$(curl --connect-timeout 5 -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')"
|
||||
until [ -n "$COUNT" ]; do COUNT="$(curl --connect-timeout 5 -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" && sleep 5; ((c++)) && echo "repeat $c" && if [[ "$c" == 10 ]]; then count=0; fi; done
|
||||
COUNT="${COUNT//,/}"
|
||||
COUNT2="$COUNT"
|
||||
echo "$COUNT $ARCH users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))"
|
||||
else COUNT2="-"; fi
|
||||
if [[ "$(jq '.arch[]' "$f/config.json")" == *"aarch64"* ]]; then
|
||||
if [[ "$(jq '.arch[]' "$f/config.json")" == *"aarch64"* ]]; then
|
||||
ARCH=aarch64 && COUNT="$(curl --connect-timeout 5 -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')"
|
||||
until [ -n "$COUNT" ]; do COUNT="$(curl --connect-timeout 5 -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" && sleep 5; ((c++)) && echo "repeat $c" && if [[ "$c" == 10 ]]; then count=0; fi; done
|
||||
COUNT="${COUNT//,/}"
|
||||
|
||||
Reference in New Issue
Block a user