From 8a8efc4f27e9db4282cf6912e2dd2eeef523f648 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Fri, 15 Nov 2024 17:33:55 +0100 Subject: [PATCH] Auto update for PI --- .github/workflows/pif.yml | 36 ++++++++++++++++++++++++++++++++++++ .gitignore | 1 - tools/pif.json | 10 ++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pif.yml create mode 100644 tools/pif.json diff --git a/.github/workflows/pif.yml b/.github/workflows/pif.yml new file mode 100644 index 0000000..e8cd73c --- /dev/null +++ b/.github/workflows/pif.yml @@ -0,0 +1,36 @@ +name: Check & Update + +on: + workflow_dispatch: + schedule: + - cron: '27 3 * * *' + +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install tool + run: sudo apt-get -o Acquire::Retries=5 install -y apktool + + - name: Update PIF + run: | + bash tools/autopif.sh + if git diff --exit-code tools/pif.json; then + echo "updated=no" >> $GITHUB_ENV + else + echo "updated=yes" >> $GITHUB_ENV + fi + + - name: Commit new file + if: env.updated == 'yes' + run: | + git add tools/pif.json + msg="Update PIF" + if [[ "$(git show --format="%s" --no-patch)" == "$msg" ]]; then + git commit --amend + else + git commit -m "$msg" + fi + git push --force-with-lease diff --git a/.gitignore b/.gitignore index 3b964b7..7845159 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ tools/XiaomiEUModule* -tools/pif.json diff --git a/tools/pif.json b/tools/pif.json new file mode 100644 index 0000000..15edccc --- /dev/null +++ b/tools/pif.json @@ -0,0 +1,10 @@ +{ + "FIRST_API_LEVEL": "25", + "MANUFACTURER": "Google", + "BRAND": "google", + "DEVICE": "akita", + "PRODUCT": "akita_beta", + "MODEL": "Pixel 8a", + "FINGERPRINT": "google/akita_beta/akita:15/AP41.240925.009/12534705:user/release-keys", + "SECURITY_PATCH": "2024-10-05" +}