Inspect extensions to get source information (#8250)

* Inspect extensions to get source information

* Use JDK 11

* Use latest Inspector from the Tachiyomiorg repo

* Use jq for the github json
This commit is contained in:
Syer10 2021-08-02 10:28:45 -04:00 committed by GitHub
parent a93ff1ad72
commit 23afa75dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

BIN
.github/runner-files/Inspector.jar vendored Normal file

Binary file not shown.

View File

@ -30,6 +30,8 @@ for APK in ${APKS[@]}; do
ICON=$(echo "$BADGING" | grep -Po "application-icon-320.*'\K[^']+")
unzip -p $APK $ICON > icon/${FILENAME%.*}.png
SOURCE_INFO=$(jq ".[\"$PKGNAME\"]" < ../output.json)
jq -n \
--arg name "$LABEL" \
--arg pkg "$PKGNAME" \
@ -38,7 +40,8 @@ for APK in ${APKS[@]}; do
--argjson code $VCODE \
--arg version "$VNAME" \
--argjson nsfw $NSFW \
'{name:$name, pkg:$pkg, apk:$apk, lang:$lang, code:$code, version:$version, nsfw:$nsfw}'
--argjson sources "$SOURCE_INFO" \
'{name:$name, pkg:$pkg, apk:$apk, lang:$lang, code:$code, version:$version, nsfw:$nsfw, sources:$sources}'
done | jq -sr '[.[]]' > index.json

View File

@ -128,6 +128,11 @@ jobs:
ref: master
path: master
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Sign APKs
run: |
cd master
@ -137,6 +142,13 @@ jobs:
${{ secrets.KEY_STORE_PASSWORD }} \
${{ secrets.KEY_PASSWORD }}
- name: Run inspector
run: |
cd master
INSPECTOR_LINK="$(curl -s "https://api.github.com/repos/tachiyomiorg/tachiyomi-extensions-inspector/releases/latest" | jq -r '.assets[0].browser_download_url')"
curl -L "$INSPECTOR_LINK" -o ./Inspector.jar
java -jar ./Inspector.jar "apk" "output.json" "tmp"
- name: Create repo artifacts
run: |
cd master