diff --git a/.github/workflows/black-lint.yml b/.github/workflows/black-lint.yml index 2d386b5426ac0..7d24f5297b2b4 100644 --- a/.github/workflows/black-lint.yml +++ b/.github/workflows/black-lint.yml @@ -1,8 +1,32 @@ name: black-linter on: - push: {} - pull_request: {} + push: + paths: + - package.json + - requirements.txt + - solution/** + - lcs/** + - lcp/** + - lcof2/** + - lcof/** + - lcci/** + - basic/** + pull_request: + paths: + - package.json + - requirements.txt + - solution/** + - lcs/** + - lcp/** + - lcof2/** + - lcof/** + - lcci/** + - basic/** + +concurrency: + group: ${{github.workflow}} - ${{github.ref}} + cancel-in-progress: true jobs: build: diff --git a/.github/workflows/clang-format-lint.yml b/.github/workflows/clang-format-lint.yml index 2f421019e7c15..3893cc9e7e38e 100644 --- a/.github/workflows/clang-format-lint.yml +++ b/.github/workflows/clang-format-lint.yml @@ -1,8 +1,32 @@ name: clang-format-linter on: - push: {} - pull_request: {} + push: + paths: + - package.json + - requirements.txt + - solution/** + - lcs/** + - lcp/** + - lcof2/** + - lcof/** + - lcci/** + - basic/** + pull_request: + paths: + - package.json + - requirements.txt + - solution/** + - lcs/** + - lcp/** + - lcof2/** + - lcof/** + - lcci/** + - basic/** + +concurrency: + group: ${{github.workflow}} - ${{github.ref}} + cancel-in-progress: true jobs: build: diff --git a/.github/workflows/compress.yml b/.github/workflows/compress.yml index d872c074e149b..8e911b5efcafd 100644 --- a/.github/workflows/compress.yml +++ b/.github/workflows/compress.yml @@ -18,6 +18,11 @@ on: workflow_dispatch: schedule: - cron: '00 23 * * 0' + +concurrency: + group: ${{github.workflow}} - ${{github.ref}} + cancel-in-progress: true + jobs: build: name: calibreapp/image-actions diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 66dd346b7ea8c..fa53e4e43bb25 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,6 +5,16 @@ on: branches: - main - docs + paths: + - package.json + - requirements.txt + - solution/** + - lcs/** + - lcp/** + - lcof2/** + - lcof/** + - lcci/** + - basic/** workflow_dispatch: env: @@ -13,9 +23,14 @@ env: permissions: contents: write +concurrency: + group: ${{github.workflow}} - ${{github.ref}} + cancel-in-progress: true + jobs: deploy: runs-on: ubuntu-latest + if: github.repository == 'doocs/leetcode' steps: - uses: actions/checkout@v4 - uses: actions/checkout@v4 diff --git a/.github/workflows/pr-add-label.yml b/.github/workflows/pr-add-label.yml index fc7710799feb9..8059d944a70fb 100644 --- a/.github/workflows/pr-add-label.yml +++ b/.github/workflows/pr-add-label.yml @@ -4,6 +4,10 @@ on: pull_request_target: types: [opened, edited, reopened, synchronize] +concurrency: + group: ${{github.workflow}} - ${{github.event_name}} + cancel-in-progress: true + jobs: add-label: permissions: diff --git a/.github/workflows/pr-checker.yml b/.github/workflows/pr-checker.yml index 7c3219116149e..5d20c141b6931 100644 --- a/.github/workflows/pr-checker.yml +++ b/.github/workflows/pr-checker.yml @@ -4,6 +4,10 @@ on: pull_request_target: types: [opened] +concurrency: + group: ${{github.workflow}} - ${{github.ref}} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index c426f358b2cdd..3487fa7874225 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -4,6 +4,10 @@ on: pull_request_target: types: [opened, edited, reopened, synchronize] +concurrency: + group: ${{github.workflow}} - ${{github.ref}} + cancel-in-progress: true + jobs: format: permissions: