From 4cbfafb8785478812d38745ef8249a75c7595170 Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Sat, 1 Oct 2022 13:06:08 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Added=20Check=20for=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-apk.yml | 1 + .github/workflows/linter.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/pr-checks.yml | 17 +++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 .github/workflows/linter.yml create mode 100644 .github/workflows/pr-checks.yml diff --git a/.github/workflows/build-apk.yml b/.github/workflows/build-apk.yml index a5d708d..0f0b69d 100644 --- a/.github/workflows/build-apk.yml +++ b/.github/workflows/build-apk.yml @@ -5,6 +5,7 @@ env: COMPOSE_DOCKER_CLI_BUILD: 1 on: workflow_dispatch: + workflow_call: concurrency: group: ${{ github.head_ref || github.run_id }} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..56f1e78 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,32 @@ +name: Linter + +# Enable Buildkit and let compose use it to speed up image building +env: + DOCKER_BUILDKIT: 1 + COMPOSE_DOCKER_CLI_BUILD: 1 + +on: + workflow_call: + workflow_dispatch: + +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + linter: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Python + uses: actions/setup-python@v4.2.0 + with: + python-version: "3.10" + cache: pip + cache-dependency-path: | + requirements.txt + + - name: Run pre-commit + uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml new file mode 100644 index 0000000..0202065 --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -0,0 +1,17 @@ +name: Build Revanced APK +# Enable Buildkit and let compose use it to speed up image building +env: + DOCKER_BUILDKIT: 1 + COMPOSE_DOCKER_CLI_BUILD: 1 +on: + workflow_dispatch: + pull_request: + +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true +jobs: + linter: + uses: ./.github/workflows/linter.yml + build-apk: + uses: ./.github/workflows/build-apk.yml