Skip to content

Commit b1cd48a

Browse files
authored
ci: auto merge との相性改善 (#621)
* ci: どうせ public repo なのでバカスカ CI を回してバカスカ auto merge したい! * ci: label がついてる branch に push した場合も snapshot update したほうが auto merge との相性がいい
1 parent 4a0c04a commit b1cd48a

2 files changed

Lines changed: 5 additions & 33 deletions

File tree

.github/workflows/test.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,7 @@ defaults:
1818
shell: bash
1919

2020
jobs:
21-
paths-filter:
22-
name: Filter Changed Packages (Test Package)
23-
runs-on: ubuntu-24.04
24-
permissions:
25-
pull-requests: read
26-
timeout-minutes: 5
27-
outputs:
28-
eslint: ${{ steps.filter.outputs.eslint }}
29-
prettier: ${{ steps.filter.outputs.prettier }}
30-
stylelint: ${{ steps.filter.outputs.stylelint }}
31-
32-
steps:
33-
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
34-
id: filter
35-
with:
36-
# package.json を含めているのは、ビルド環境が変わった場合にすべてのパッケージをテストするようにするため
37-
filters: |
38-
eslint:
39-
- 'packages/eslint-config/**'
40-
- 'package.json'
41-
prettier:
42-
- 'packages/prettier-config/**'
43-
- 'package.json'
44-
stylelint:
45-
- 'packages/stylelint-config/**'
46-
- 'package.json'
47-
4821
test:
49-
needs: paths-filter
5022
name: Vitest (Test Package)
5123
runs-on: ubuntu-24.04
5224
timeout-minutes: 10
@@ -63,17 +35,14 @@ jobs:
6335

6436
- name: Test ESLint Config
6537
id: eslint
66-
if: ${{ needs.paths-filter.outputs.eslint == 'true' }}
6738
run: pnpm run build:eslint && pnpm run test --project eslint-config
6839

6940
- name: Test Prettier Config
7041
id: prettier
71-
if: ${{ needs.paths-filter.outputs.prettier == 'true' }}
7242
run: pnpm run build:prettier && pnpm run test --project prettier-config
7343

7444
- name: Test Stylelint Config
7545
id: stylelint
76-
if: ${{ needs.paths-filter.outputs.stylelint == 'true' }}
7746
run: pnpm run build:stylelint && pnpm run test --project stylelint-config
7847

7948
- name: Comment if success

.github/workflows/update-snapshot.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ on:
1919
default: false
2020
type: boolean
2121
pull_request:
22-
types: [labeled]
22+
types:
23+
- labeled
24+
- opened
25+
- synchronize
2326
branches:
2427
- "main"
2528
paths:
@@ -39,7 +42,7 @@ jobs:
3942
check-target-packages:
4043
name: Check Target Packages (Update Snapshot)
4144
runs-on: ubuntu-24.04
42-
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && !contains(github.event.pull_request.user.name, 'bot') && github.event.label.name == 'update-snapshot')
45+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && !contains(github.event.pull_request.user.name, 'bot') && contains(github.event.pull_request.labels.*.name, 'update-snapshot'))
4346
outputs:
4447
eslint: ${{ steps.target-packages.outputs.eslint }}
4548
prettier: ${{ steps.target-packages.outputs.prettier }}

0 commit comments

Comments
 (0)