action-build.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: Dependabot post-update
  2. on:
  3. pull_request_target:
  4. types: [opened, synchronize, reopened]
  5. branches:
  6. - main
  7. env:
  8. HUSKY: "0"
  9. concurrency:
  10. group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
  11. cancel-in-progress: true
  12. jobs:
  13. post-update:
  14. if: ${{ github.actor == 'dependabot[bot]' }}
  15. runs-on: ubuntu-latest
  16. strategy:
  17. matrix:
  18. node-version: [20]
  19. steps:
  20. - name: Checkout code
  21. uses: actions/checkout@v4
  22. with:
  23. fetch-depth: 0
  24. - name: Checkout out pull request
  25. env:
  26. GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
  27. run: |
  28. gh pr checkout ${{ github.event.pull_request.number }}
  29. - name: Install pnpm
  30. uses: pnpm/action-setup@v4
  31. - name: Use Node.js ${{ matrix.node-version }}
  32. uses: actions/setup-node@v4
  33. with:
  34. node-version: ${{ matrix.node-version }}
  35. cache: "pnpm"
  36. - name: Install dependencies
  37. run: pnpm install --frozen-lockfile
  38. - name: Test and Build
  39. run: |
  40. pnpm run test:unit
  41. pnpm run build