ci: harden workflow defaults

This commit is contained in:
Your Name 2026-05-27 12:00:40 +08:00
parent 499fceb689
commit 8e9669c748
2 changed files with 17 additions and 2 deletions

View File

@ -4,9 +4,17 @@ on:
push:
pull_request:
permissions:
contents: read
concurrency:
group: quality-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
runs-on: ubuntu-22.04
timeout-minutes: 20
strategy:
matrix:
node-version: [20]

View File

@ -5,10 +5,17 @@ on:
pull_request:
branches: [main, master]
permissions:
contents: read
concurrency:
group: playwright-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
timeout-minutes: 30
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: >-
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
@ -38,7 +45,7 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Cache Playwright browsers
uses: actions/cache@v3
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright