build.yml 1.1 KB

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