From 4db33db1753d8fba08207bb404cce367f0abaf39 Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Fri, 11 Aug 2023 15:09:02 -0400 Subject: [PATCH] Add GitHub Actions workflow to build modules Fixes: #123 Signed-off-by: Andrew Gunnerson --- .github/workflows/modules.yml | 29 +++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/modules.yml diff --git a/.github/workflows/modules.yml b/.github/workflows/modules.yml new file mode 100644 index 0000000..7be238c --- /dev/null +++ b/.github/workflows/modules.yml @@ -0,0 +1,29 @@ +--- +on: + push: + branches: + - master + pull_request: +jobs: + build-app: + name: Build modules + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get version + id: get_version + shell: bash + run: echo "version=r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" >> "${GITHUB_OUTPUT}" + + - name: Build and test + run: ./modules/build.py + + - name: Archive artifacts + uses: actions/upload-artifact@v3 + with: + name: avbroot-modules-${{ steps.get_version.outputs.version }} + path: modules/dist/ diff --git a/README.md b/README.md index 09b278d..c232f29 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,8 @@ python modules/build.py This requires Java and the Android SDK to be installed. The `ANDROID_HOME` environment variable should be set to the Android SDK path. +Alternatively, prebuilt modules can be downloaded [from GitHub Actions](https://github.com/chenxiaolong/avbroot/actions/workflows/modules.yml?query=branch%3Amaster). Select the latest workflow run and then download `avbroot-modules-` at the bottom of the page. Note that GitHub only allows downloading the file when logged in. + ### `clearotacerts`: Blocking A/B OTA Updates Unpatched OTA updates are already blocked in recovery because the original OTA certificate has been replaced with the custom certificate. To disable automatic OTAs while booted into Android, turn off `Automatic system updates` in Android's Developer Options.