Auto Build & Release #4972
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Build & Release | |
env: | |
DOCKER_BUILDKIT: 1 | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
HAVE_TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID != '' }} | |
on: | |
workflow_dispatch: | |
inputs: | |
TELEGRAM_NO_ROOT_UPLOAD: | |
description: "Upload Non Rooted APKs to Telegram" | |
required: false | |
type: boolean | |
default: true | |
TELEGRAM_ROOT_UPLOAD: | |
description: "Upload Magisk Module from nikhilbadyal/revanced-magisk-module to Telegram" | |
required: false | |
type: boolean | |
default: false | |
schedule: | |
- cron: '0 * * * *' | |
jobs: | |
release-check: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update Env for custom build | |
run: | | |
echo "${{ secrets.ENVS }}" >> .env | |
- name: Setup python | |
uses: actions/setup-python@main | |
with: | |
python-version: '3.12.3' | |
- name: Install Requirements | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Should build? | |
id: should_build | |
shell: bash | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
should_build=$(python check_resource_updates.py) | |
echo "SHOULD_BUILD=$should_build" >> $GITHUB_OUTPUT | |
outputs: | |
SHOULD_BUILD: ${{ steps.should_build.outputs.SHOULD_BUILD }} | |
build-release: | |
permissions: write-all | |
needs: release-check | |
uses: ./.github/workflows/build-apk.yml | |
if: ${{ needs.release-check.outputs.SHOULD_BUILD }} | |
secrets: inherit | |
concurrency: | |
group: Auto-Release-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
with: | |
TELEGRAM_NO_ROOT_UPLOAD: true | |
PREFERRED_PATCH_APPS: ${{ needs.release-check.outputs.SHOULD_BUILD }} |