mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
Filter to be patched (#505)
This commit is contained in:
@@ -50,11 +50,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
should_build=$(python check_resource_updates.py)
|
should_build=$(python check_resource_updates.py)
|
||||||
if [ "$should_build" = "True" ]; then
|
echo "SHOULD_BUILD=$should_build" >> $GITHUB_OUTPUT
|
||||||
echo "SHOULD_BUILD=1" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "SHOULD_BUILD=0" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
outputs:
|
outputs:
|
||||||
SHOULD_BUILD: ${{ steps.should_build.outputs.SHOULD_BUILD }}
|
SHOULD_BUILD: ${{ steps.should_build.outputs.SHOULD_BUILD }}
|
||||||
|
|
||||||
@@ -62,7 +58,7 @@ jobs:
|
|||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: release-check
|
needs: release-check
|
||||||
uses: ./.github/workflows/build-apk.yml
|
uses: ./.github/workflows/build-apk.yml
|
||||||
if: ${{ needs.release-check.outputs.SHOULD_BUILD == 1 }}
|
if: ${{ needs.release-check.outputs.SHOULD_BUILD }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
concurrency:
|
concurrency:
|
||||||
group: Auto-Release-${{ github.head_ref || github.run_id }}
|
group: Auto-Release-${{ github.head_ref || github.run_id }}
|
||||||
@@ -70,3 +66,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
TELEGRAM_NO_ROOT_UPLOAD: true
|
TELEGRAM_NO_ROOT_UPLOAD: true
|
||||||
TELEGRAM_ROOT_UPLOAD: true
|
TELEGRAM_ROOT_UPLOAD: true
|
||||||
|
PREFERRED_PATCH_APPS: ${{ needs.release-check.outputs.SHOULD_BUILD }}
|
||||||
|
|||||||
@@ -46,6 +46,10 @@ on:
|
|||||||
description: 'Run the build with tmate debugging enabled.'
|
description: 'Run the build with tmate debugging enabled.'
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
|
PREFERRED_PATCH_APPS:
|
||||||
|
description: "Apps to be patched. Overrides any env set"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
GITHUB_UPLOAD:
|
GITHUB_UPLOAD:
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ def check_if_build_is_required() -> bool:
|
|||||||
env = Env()
|
env = Env()
|
||||||
env.read_env()
|
env.read_env()
|
||||||
config = RevancedConfig(env)
|
config = RevancedConfig(env)
|
||||||
|
needs_to_repatched = []
|
||||||
for app_name in env.list("PATCH_APPS", default_build):
|
for app_name in env.list("PATCH_APPS", default_build):
|
||||||
logger.info(f"Checking {app_name}")
|
logger.info(f"Checking {app_name}")
|
||||||
app_obj = get_app(config, app_name)
|
app_obj = get_app(config, app_name)
|
||||||
@@ -39,9 +40,11 @@ def check_if_build_is_required() -> bool:
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
logger.info(f"New build can be triggered caused by {caused_by}")
|
logger.info(f"New build can be triggered caused by {caused_by}")
|
||||||
print(True) # noqa: FBT003,T201
|
needs_to_repatched.append(app_name)
|
||||||
return True
|
logger.info(f"{needs_to_repatched} are need to repatched.")
|
||||||
print(False) # noqa: FBT003,T201
|
if len(needs_to_repatched) > 0:
|
||||||
|
print(",".join(needs_to_repatched)) # noqa: T201
|
||||||
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user