chore(workflows): update permissions across GitHub Actions workflows … (#14919)

…for consistency
This commit is contained in:
Antoine Moreaux
2025-10-06 17:36:41 +02:00
committed by GitHub
parent 843689ee05
commit 93d55d1bc2
19 changed files with 69 additions and 27 deletions
+5
View File
@@ -1,8 +1,13 @@
name: CD deploy main
permissions:
contents: read
on:
push:
branches:
- main
jobs:
deploy-main:
timeout-minutes: 3
+5
View File
@@ -1,8 +1,13 @@
name: CD deploy tag
permissions:
contents: read
on:
push:
tags:
- 'v*'
jobs:
deploy-tag:
timeout-minutes: 3
+1
View File
@@ -1,4 +1,5 @@
name: Changed files reusable workflow
on:
workflow_call:
inputs:
+1
View File
@@ -1,4 +1,5 @@
name: CI CLI
on:
push:
branches:
+1
View File
@@ -1,4 +1,5 @@
name: CI E2E Playwright Tests
on:
push:
branches:
+4
View File
@@ -1,4 +1,8 @@
name: CI Emails
permissions:
contents: read
on:
push:
branches:
+1
View File
@@ -1,4 +1,5 @@
name: CI Front
on:
push:
branches:
+13 -8
View File
@@ -1,4 +1,9 @@
name: "Release: create"
permissions:
contents: read
pull-requests: write
on:
workflow_dispatch:
inputs:
@@ -35,11 +40,11 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: release/${{ steps.sanitize.outputs.version }}
commit-message: "chore: release v${{ steps.sanitize.outputs.version }}"
committer: Github Action Deploy <github-action-deploy@twenty.com>
author: Github Action Deploy <github-action-deploy@twenty.com>
title: Release v${{ steps.sanitize.outputs.version }}
labels: |
release
${{ github.event.inputs.create_release == true && 'create_release' || '' }}
branch: release/${{ steps.sanitize.outputs.version }}
commit-message: "chore: release v${{ steps.sanitize.outputs.version }}"
committer: Github Action Deploy <github-action-deploy@twenty.com>
author: Github Action Deploy <github-action-deploy@twenty.com>
title: Release v${{ steps.sanitize.outputs.version }}
labels: |
release
${{ github.event.inputs.create_release == true && 'create_release' || '' }}
+4
View File
@@ -1,4 +1,8 @@
name: "Release: on merge"
permissions:
contents: write
on:
pull_request:
types:
+1
View File
@@ -1,4 +1,5 @@
name: CI Server
on:
push:
branches:
+1
View File
@@ -1,4 +1,5 @@
name: CI Shared
on:
push:
branches:
+3
View File
@@ -1,4 +1,5 @@
name: CI Utils
on:
# it's usually not recommended to use pull_request_target
# but we consider it's safe here if we keep the same steps
@@ -6,6 +7,7 @@ on:
# and: https://github.com/facebook/react-native/pull/34370/files
pull_request_target:
types: [opened, synchronize, reopened, closed]
permissions:
actions: write
checks: write
@@ -13,6 +15,7 @@ permissions:
issues: write
pull-requests: write
statuses: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# We don't cancel in-progress because this workflow is triggered on
+4
View File
@@ -1,4 +1,8 @@
name: CI Website
permissions:
contents: read
on:
push:
branches:
+4 -4
View File
@@ -3,6 +3,10 @@
name: 'Pull translations from Crowdin'
permissions:
contents: write
pull-requests: write
on:
schedule:
- cron: '0 */2 * * *' # Every two hours.
@@ -29,10 +33,6 @@ jobs:
pull_translations:
name: Pull translations
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
+4 -3
View File
@@ -1,5 +1,9 @@
name: 'Push translations to Crowdin'
permissions:
contents: write
pull-requests: write
on:
workflow_dispatch:
workflow_call:
@@ -14,9 +18,6 @@ jobs:
extract_translations:
name: Extract and upload translations
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
+5 -4
View File
@@ -1,5 +1,10 @@
name: 'Preview Environment Dispatch'
permissions:
contents: write
actions: write
pull-requests: read
on:
# Using pull_request_target instead of pull_request to have access to secrets for external contributors
# Security note: This is safe because we're only using the repository-dispatch action with limited scope
@@ -19,10 +24,6 @@ concurrency:
jobs:
trigger-preview:
permissions:
contents: write
actions: write
pull-requests: read
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || (github.event.action == 'labeled' && github.event.label.name == 'preview-app')
timeout-minutes: 5
runs-on: ubuntu-latest
@@ -1,5 +1,9 @@
name: 'Preview Environment Keep Alive'
permissions:
contents: read
pull-requests: write
on:
repository_dispatch:
types: [preview-environment]