Skip to content

Commit baa1174

Browse files
authored
chore: fix potential github action smells (doocs#2677)
1 parent 1fd56e0 commit baa1174

File tree

7 files changed

+84
-4
lines changed

7 files changed

+84
-4
lines changed

.github/workflows/black-lint.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
11
name: black-linter
22

33
on:
4-
push: {}
5-
pull_request: {}
4+
push:
5+
paths:
6+
- package.json
7+
- requirements.txt
8+
- solution/**
9+
- lcs/**
10+
- lcp/**
11+
- lcof2/**
12+
- lcof/**
13+
- lcci/**
14+
- basic/**
15+
pull_request:
16+
paths:
17+
- package.json
18+
- requirements.txt
19+
- solution/**
20+
- lcs/**
21+
- lcp/**
22+
- lcof2/**
23+
- lcof/**
24+
- lcci/**
25+
- basic/**
26+
27+
concurrency:
28+
group: ${{github.workflow}} - ${{github.ref}}
29+
cancel-in-progress: true
630

731
jobs:
832
build:

.github/workflows/clang-format-lint.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
11
name: clang-format-linter
22

33
on:
4-
push: {}
5-
pull_request: {}
4+
push:
5+
paths:
6+
- package.json
7+
- requirements.txt
8+
- solution/**
9+
- lcs/**
10+
- lcp/**
11+
- lcof2/**
12+
- lcof/**
13+
- lcci/**
14+
- basic/**
15+
pull_request:
16+
paths:
17+
- package.json
18+
- requirements.txt
19+
- solution/**
20+
- lcs/**
21+
- lcp/**
22+
- lcof2/**
23+
- lcof/**
24+
- lcci/**
25+
- basic/**
26+
27+
concurrency:
28+
group: ${{github.workflow}} - ${{github.ref}}
29+
cancel-in-progress: true
630

731
jobs:
832
build:

.github/workflows/compress.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
workflow_dispatch:
1919
schedule:
2020
- cron: '00 23 * * 0'
21+
22+
concurrency:
23+
group: ${{github.workflow}} - ${{github.ref}}
24+
cancel-in-progress: true
25+
2126
jobs:
2227
build:
2328
name: calibreapp/image-actions

.github/workflows/deploy.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ on:
55
branches:
66
- main
77
- docs
8+
paths:
9+
- package.json
10+
- requirements.txt
11+
- solution/**
12+
- lcs/**
13+
- lcp/**
14+
- lcof2/**
15+
- lcof/**
16+
- lcci/**
17+
- basic/**
818
workflow_dispatch:
919

1020
env:
@@ -13,9 +23,14 @@ env:
1323
permissions:
1424
contents: write
1525

26+
concurrency:
27+
group: ${{github.workflow}} - ${{github.ref}}
28+
cancel-in-progress: true
29+
1630
jobs:
1731
deploy:
1832
runs-on: ubuntu-latest
33+
if: github.repository == 'doocs/leetcode'
1934
steps:
2035
- uses: actions/checkout@v4
2136
- uses: actions/checkout@v4

.github/workflows/pr-add-label.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request_target:
55
types: [opened, edited, reopened, synchronize]
66

7+
concurrency:
8+
group: ${{github.workflow}} - ${{github.event_name}}
9+
cancel-in-progress: true
10+
711
jobs:
812
add-label:
913
permissions:

.github/workflows/pr-checker.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request_target:
55
types: [opened]
66

7+
concurrency:
8+
group: ${{github.workflow}} - ${{github.ref}}
9+
cancel-in-progress: true
10+
711
jobs:
812
build:
913
runs-on: ubuntu-latest

.github/workflows/prettier.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request_target:
55
types: [opened, edited, reopened, synchronize]
66

7+
concurrency:
8+
group: ${{github.workflow}} - ${{github.ref}}
9+
cancel-in-progress: true
10+
711
jobs:
812
format:
913
permissions:

0 commit comments

Comments
 (0)