chore: add explicit GitHub workflow permissions

PiperOrigin-RevId: 815915576
This commit is contained in:
Elizabeth Mitchell 2025-10-06 15:48:26 -07:00 committed by Copybara-Service
parent 5345efddde
commit 417e1cfe67
9 changed files with 35 additions and 1 deletions

View File

@ -2,6 +2,9 @@ name: Build Catalog
on: [push]
permissions:
contents: read
jobs:
build-catalog:
runs-on: ubuntu-latest
@ -16,4 +19,4 @@ jobs:
- run: npm ci
- run: npm run build:catalog
env:
WIREIT_FAILURES: continue
WIREIT_FAILURES: continue

View File

@ -2,6 +2,9 @@ name: commitlint
on: [pull_request]
permissions:
contents: read
jobs:
commitlint:
runs-on: ubuntu-latest

View File

@ -5,6 +5,10 @@ name: Deploy to Firebase Hosting on release and manual
- published
workflow_dispatch:
# allows triggering from the gihub UI
permissions:
contents: read
jobs:
build_and_deploy:
runs-on: ubuntu-latest

View File

@ -5,6 +5,11 @@ name: Deploy to Firebase Hosting on PR
on:
pull_request:
types: [ labeled ]
permissions:
contents: read
pull-requests: write
jobs:
build_and_preview:
if: github.event.label.name == 'preview-catalog' && github.event.pull_request.head.repo.full_name == github.repository

View File

@ -6,6 +6,9 @@ on:
workflow_dispatch:
# allows triggering from the github UI
permissions:
contents: write
jobs:
check_for_changes:
runs-on: ubuntu-latest

View File

@ -5,6 +5,9 @@ on:
tags:
- 'v*'
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest

View File

@ -2,6 +2,9 @@ name: Tests
on: [push]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest

View File

@ -5,6 +5,11 @@ on:
branches: main
workflow_dispatch:
# allows triggering from the github UI
permissions:
contents: write
pull-requests: write
jobs:
check-for-doc-changes:
runs-on: ubuntu-latest

View File

@ -5,6 +5,11 @@ on:
branches: main
workflow_dispatch:
# allows triggering from the github UI
permissions:
contents: write
pull-requests: write
jobs:
check-for-doc-changes:
runs-on: ubuntu-latest