Skip to content

Commit

Permalink
Add action to ensure clean lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-mullvad committed Jun 17, 2024
1 parent 666886b commit bd19bac
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/android-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- android/gradle/verification-metadata.xml
- android/config/dependency-check-suppression.xml
- android/test/test-suppression.xml
- android/scripts/update-lockfile.sh
schedule:
# At 06:20 UTC every day.
# Notifications for scheduled workflows are sent to the user who last modified the cron
Expand Down Expand Up @@ -59,3 +60,33 @@ jobs:

- name: Run gradle audit task
run: android/gradlew -p android dependencyCheckAnalyze

ensure-clean-lockfile:
needs: prepare
name: Ensure clean lockfile
runs-on: ubuntu-latest
container:
image: ${{ needs.prepare.outputs.container_image }}
steps:
# Fix for HOME path overridden by GH runners when building in containers, see:
# https://github.com/actions/runner/issues/863
- name: Fix HOME path
run: echo "HOME=/root" >> $GITHUB_ENV

- name: Set locale
run: echo "LC_ALL=C.UTF-8" >> $GITHUB_ENV

- uses: actions/checkout@v3

- name: Fix git dir
run: git config --global --add safe.directory $(pwd)

# Needed until we improve the build system.
- name: Create dummy jni dir
run: mkdir -p android/app/build/extraJni

- name: Re-generate lockfile
run: android/scripts/update-lockfile.sh

- name: Ensure no changes
run: git diff --exit-code

0 comments on commit bd19bac

Please sign in to comment.