[auth] Add "Dupe" icon to custom icons #1511
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Lint (auth)" | |
| on: | |
| # Run on every pull request (open or push to it) that changes auth/ | |
| pull_request: | |
| paths: | |
| - "mobile/apps/auth/**" | |
| - ".github/workflows/auth-lint.yml" | |
| env: | |
| FLUTTER_VERSION: "3.32.8" | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: mobile/apps/auth | |
| steps: | |
| - name: Checkout code and submodules | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Verify custom icons are lowercase including optional understores, and end with .svg | |
| run: | | |
| find assets/custom-icons -type f -name "*.svg" | while read -r file; do | |
| if [[ "$(basename "$file")" != "$(basename "$file" | tr '[:upper:]' '[:lower:]' | tr ' ' '_')" ]]; then | |
| echo "File name is not lowercase: $file" | |
| exit 1 | |
| fi | |
| done | |
| - name: Verify all icons are less than 20KB | |
| run: | | |
| find assets/custom-icons -type f -name "*.svg" | while read -r file; do | |
| if [[ "$file" == "assets/custom-icons/icons/bbs_nga.svg" ]]; then | |
| continue | |
| fi | |
| if [[ "$(stat --printf="%s" "$file")" -gt 20480 ]]; then | |
| echo "File size is greater than 20KB: $file ($file_size bytes)" | |
| exit 1 | |
| fi | |
| done | |
| - name: Verify custom icon JSON | |
| run: cat assets/custom-icons/_data/custom-icons.json | jq empty | |
| - name: Verify custom icon hex codes | |
| run: | | |
| jq -r '.icons[] | select(.hex != null) | .hex' assets/custom-icons/_data/custom-icons.json | while read -r hex; do | |
| if [[ -z "$hex" ]]; then | |
| continue | |
| fi | |
| if [[ ! "$hex" =~ ^[0-9a-fA-F]{6}$ ]]; then | |
| echo "Invalid hex color '$hex'. Must be exactly 6 hexadecimal characters." | |
| exit 1 | |
| fi | |
| done | |
| - name: Install Flutter ${{ env.FLUTTER_VERSION }} | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Generate strings localizations | |
| run: flutter gen-l10n | |
| working-directory: mobile/packages/strings | |
| - run: flutter pub get | |
| - run: flutter analyze --no-fatal-infos |