-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (46 loc) · 1.52 KB
/
unused-resources.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
45
46
47
48
49
50
51
52
53
54
55
56
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@v4
- 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: '21'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
# Only write to the cache for builds on the 'develop' branch
cache-read-only: false
- 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:lint -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@v7
with:
token: ${{ steps.generate_token.outputs.token }}
branch: "maintenance/remove-unused-resources"
title: "Maintenance: Remove unused resources"
body: ""