Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ on:
- '.github/workflows/deploy-docs.yml'
workflow_dispatch:

# deploy 잡이 pages·id-token 권한을 자체 선언하므로 최상위는 읽기만 준다.
# 최상위에 두면 build 잡까지 상속받는데, build는 pnpm install로 서드파티
# lifecycle 스크립트를 실행하는 잡이다. id-token: write가 있으면 그 코드가
# 설정된 클라우드 신뢰 정책에 대해 OIDC 토큰을 발급할 수 있다.
permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/deploy-zpl-viewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- 'zpl-viewer/v*'
workflow_dispatch:

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -22,8 +25,13 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

# CLI 버전을 고정한다. `pnpm dlx vercel`은 매 실행마다 최신을 받아
# 프로덕션 토큰을 바로 넘기는 구조라 락파일도 무결성 검사도 없었다.
# 토큰은 --token= 인자 대신 VERCEL_TOKEN env로 넘긴다. 인자로 주면
# 러너의 process argv에 남아 같은 러너의 다른 프로세스에서 보인다.
- name: Deploy to Vercel
run: pnpm dlx vercel --prod --yes --token=${{ secrets.VERCEL_TOKEN }}
run: pnpm dlx vercel@56.3.1 --prod --yes
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
5 changes: 5 additions & 0 deletions .github/workflows/publish-npm-react-zpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- 'react-zpl/v*'
workflow_dispatch:

# 두 잡 모두 레포 쓰기 권한이 필요 없다. publish 잡은 NPM_TOKEN을 들고 있으므로
# GITHUB_TOKEN 범위는 최소로 둔다.
permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/publish-npm-zpl-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- 'zpl-core/v*'
workflow_dispatch:

# 두 잡 모두 레포 쓰기 권한이 필요 없다. publish 잡은 NPM_TOKEN을 들고 있으므로
# GITHUB_TOKEN 범위는 최소로 둔다.
permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ jobs:
update-draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
# 서드파티 액션이므로 가변 태그(@v6) 대신 커밋 SHA로 고정한다.
# contents: write를 주는 액션이라 태그가 재지정되면 레포 쓰기 권한이
# 임의 코드에 넘어간다.
- uses: release-drafter/release-drafter@6a93d829887aa2e0748befe2e808c66c0ec6e4c7 # v6.4.0
with:
publish: false
env:
Expand Down
Loading