build.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. permissions:
  14. contents: read
  15. pull-requests: write
  16. jobs:
  17. post-update:
  18. if: github.repository == 'vbenjs/vue-vben-admin'
  19. # if: ${{ github.actor == 'dependabot[bot]' }}
  20. runs-on: ${{ matrix.os }}
  21. strategy:
  22. matrix:
  23. os:
  24. - ubuntu-latest
  25. # - macos-latest
  26. - windows-latest
  27. steps:
  28. - name: Checkout code
  29. uses: actions/checkout@v4
  30. with:
  31. fetch-depth: 0
  32. - name: Checkout out pull request
  33. env:
  34. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  35. run: |
  36. gh pr checkout ${{ github.event.pull_request.number }}
  37. - name: Setup Node
  38. uses: ./.github/actions/setup-node
  39. - name: Build
  40. run: |
  41. pnpm run build