diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2795216..8253025 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,21 @@ name: validate -on: [push, pull_request] +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +# 连推多次时只保留最后一次,避免排队任务白烧分钟 +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: validate: runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4