Skip to content

Commit 6228b43

Browse files
authored
ci: use SHA and fix zizmor errors (#24)
1 parent e6382c2 commit 6228b43

6 files changed

Lines changed: 82 additions & 26 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- master
1010
workflow_dispatch:
1111

12+
permissions:
13+
contents: read
14+
1215
concurrency:
1316
group: ci-${{ github.event.pull_request.number || github.ref }}
1417
cancel-in-progress: true
@@ -18,24 +21,30 @@ env:
1821

1922
jobs:
2023
lint:
24+
name: Lint
2125
runs-on: ubuntu-latest
2226
steps:
23-
- uses: actions/checkout@v6
24-
- uses: voidzero-dev/setup-vp@v1
27+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
with:
29+
persist-credentials: false
30+
- uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1.10.0
2531
- run: vp i
2632
- run: vp check --no-lint
2733
- run: vp run build
2834
- run: vp run typecheck
2935

3036
test:
37+
name: Test
3138
strategy:
3239
matrix:
3340
os: [ubuntu-latest, macos-latest, windows-latest]
3441
fail-fast: false
3542
runs-on: ${{ matrix.os }}
3643
steps:
37-
- uses: actions/checkout@v6
38-
- uses: voidzero-dev/setup-vp@v1
44+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
45+
with:
46+
persist-credentials: false
47+
- uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1.10.0
3948
- run: vp i
4049
- run: vp run build
4150
- run: vp exec playwright install --with-deps

.github/workflows/pkg-pr-new.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,24 @@ on:
77
pull_request:
88
types: [opened, synchronize]
99

10+
permissions:
11+
contents: read
12+
1013
concurrency:
1114
group: cr-${{ github.event.pull_request.number || github.ref }}
1215
cancel-in-progress: true
1316

1417
jobs:
1518
release:
19+
name: Publish preview
1620
if: github.repository == 'vitest-dev/ivya'
1721
runs-on: ubuntu-latest
1822
steps:
19-
- uses: actions/checkout@v6
20-
- uses: actions/setup-node@v6
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
persist-credentials: false
26+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2127
- run: corepack enable
2228
- run: pnpm i
2329
- run: pnpm run build
24-
- run: pnpm dlx pkg-pr-new publish --compact --no-template --pnpm
30+
- run: pnpm dlx pkg-pr-new publish --compact --no-template --pnpm # zizmor: ignore[use-trusted-publishing] pkg-pr-new doesn't publish to npm

.github/workflows/publish.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,29 @@ on:
55
tags:
66
- 'v*'
77

8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: publish-${{ github.ref }}
13+
cancel-in-progress: false
14+
815
jobs:
916
publish:
17+
name: Publish
1018
if: github.repository == 'vitest-dev/ivya'
1119
runs-on: ubuntu-latest
1220
permissions:
13-
contents: write
14-
id-token: write
21+
contents: write # changelogithub creates a GitHub release
22+
id-token: write # npm provenance via OIDC
1523
environment: Release
1624
steps:
17-
- uses: actions/checkout@v6
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1826
with:
1927
fetch-depth: 0
20-
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
21-
- uses: actions/setup-node@v6
28+
persist-credentials: false
29+
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
30+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2231
with:
2332
node-version: 24
2433
registry-url: https://registry.npmjs.org/

.github/workflows/zizmor.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Zizmor
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
paths:
10+
- '.github/workflows/**'
11+
12+
permissions: {}
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
16+
cancel-in-progress: ${{ github.ref_name != 'main' }}
17+
18+
jobs:
19+
zizmor:
20+
name: Run zizmor
21+
runs-on: ubuntu-latest
22+
permissions:
23+
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
24+
steps:
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
with:
27+
persist-credentials: false
28+
29+
- name: Run zizmor 🌈
30+
uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6
31+
with:
32+
persona: pedantic

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@vitest/browser-playwright": "^4.1.0",
4545
"bumpp": "^10.4.1",
4646
"changelogithub": "^14.0.0",
47-
"playwright": "^1.58.2",
47+
"playwright": "^1.60.0",
4848
"typescript": "^5.8.2",
4949
"vite": "^8.0.0",
5050
"vite-plus": "latest",

pnpm-lock.yaml

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)