Skip to content

Commit

Permalink
Avoid NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
tzagim authored May 24, 2024
1 parent 4537b5f commit 7beeb01
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,26 @@ jobs:
outputs:
start_relase: ${{ steps.differencescheck.outputs.value }}
steps:
- name: 🔃 Checkout code
- name: Checkout code
uses: actions/checkout@v4

- name: ⚙️ Install apktool
- name: Install apktool
run: sudo apt-get install -y apktool

- name: ⚙️ Grant execute permission for script
- name: Grant execute permission for script
run: chmod +x pif.sh

- name: ⚙️ Generate JSON file
- name: Generate JSON file
run: ./pif.sh

- name: 🔃 Check differences in custom.pif.json
- name: Check differences in custom.pif.json
id: differencescheck
run: |
if git diff --exit-code custom.pif.json; then
echo "custom.pif.json is the same, no need to commit."
elif
git diff | grep -P '.*MANUFACTURER.*null.*'; then
echo "Something is wrong with the new custom.pif.json, not commit."
else
echo "value=build" >> "$GITHUB_OUTPUT"
echo "NOW=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
Expand All @@ -49,8 +52,9 @@ jobs:
tag_name: ${{ env.NOW }}
files: custom.pif.json

# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: custom.pif.json
# path: custom.pif.json
- name: 🔖 Upload artifact
uses: actions/upload-artifact@v4
if: steps.differencescheck.outputs.value == 'build'
with:
name: custom.pif.json
path: custom.pif.json

0 comments on commit 7beeb01

Please sign in to comment.