-
-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (38 loc) · 1.14 KB
/
pif.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Check & Update
permissions:
contents: write
on:
workflow_dispatch:
schedule:
- cron: '27 3 * * *'
jobs:
update:
if: github.repository_owner == 'Flamefire'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- 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 config --global user.email "[email protected]"
git config --global user.name "Alexander Grund"
git add tools/pif.json
msg="Update PIF"
if [[ "$(git show --format="%s" --no-patch)" == "$msg" ]]; then
git commit --amend --no-edit
else
git commit -m "$msg"
fi
git push --force-with-lease