validate-icons.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Validate icons
  2. on: [pull_request]
  3. permissions:
  4. pull-requests: write
  5. jobs:
  6. validate:
  7. if: github.repository == 'tabler/tabler-icons'
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v4
  11. - name: Use Node.js 20
  12. uses: actions/setup-node@v3
  13. with:
  14. node-version: 20
  15. - uses: pnpm/action-setup@v3
  16. name: Install pnpm
  17. with:
  18. version: 8
  19. run_install: false
  20. - name: Get pnpm store directory
  21. shell: bash
  22. run: |
  23. echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
  24. - uses: actions/cache@v3
  25. name: Setup pnpm cache
  26. with:
  27. path: ${{ env.STORE_PATH }}
  28. key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
  29. restore-keys: |
  30. ${{ runner.os }}-pnpm-store-
  31. - name: Install dependencies
  32. run: pnpm install --no-frozen-lockfile
  33. - name: Validate icons
  34. id: validate
  35. run: pnpm run --silent validate > ./comment-markup.md
  36. continue-on-error: true
  37. - name: Comment PR
  38. uses: thollander/actions-comment-pull-request@v2
  39. with:
  40. filePath: ./comment-markup.md
  41. comment_tag: validate
  42. mode: recreate