Skip to content

remove_unused_resources #274

remove_unused_resources

remove_unused_resources #274

name: remove_unused_resources
on:
schedule:
- cron: "30 9 1 * *"
jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Add GitHub Packages auth
run: ./scripts/ci-github-packages-properties.sh
- name: Setup JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
# Only write to the cache for builds on the 'develop' branch
cache-read-only: false
gradle-home-cache-cleanup: true
- name: Prebuild
run: ./scripts/ci-prebuild.sh
env:
LOKALISE_ID: ${{ secrets.LOKALISE_ID }}
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
- name: Run android lint
run: ./gradlew :app:lintDebug -Prur.lint.onlyUnusedResources
- name: Remove unused resources
run: ./gradlew :app:removeUnusedResourcesDebug
- name: Generate Token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.CI_APP_ID }}
private_key: ${{ secrets.CI_APP_PRIVATE_KEY }}
- name: Create PR
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate_token.outputs.token }}
branch: "maintenance/remove-unused-resources"
title: "Maintenance: Remove unused resources"
body: ""