chore: update workflow permissions (#15349)

This commit is contained in:
Muhammad Atif Ali
2024-11-04 11:09:40 +05:00
committed by GitHub
parent 065263a852
commit 3a5a42ffa9
3 changed files with 8 additions and 9 deletions
+2 -9
View File
@@ -9,16 +9,7 @@ on:
workflow_dispatch: workflow_dispatch:
permissions: permissions:
actions: none
checks: none
contents: read contents: read
deployments: none
issues: none
packages: write
pull-requests: none
repository-projects: none
security-events: none
statuses: none
# Cancel in-progress runs for pull requests when developers push # Cancel in-progress runs for pull requests when developers push
# additional changes # additional changes
@@ -821,6 +812,8 @@ jobs:
needs: changes needs: changes
if: github.ref == 'refs/heads/main' && needs.changes.outputs.docs-only == 'false' && !github.event.pull_request.head.repo.fork if: github.ref == 'refs/heads/main' && needs.changes.outputs.docs-only == 'false' && !github.event.pull_request.head.repo.fork
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }} runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
permissions:
packages: write # Needed to push images to ghcr.io
env: env:
DOCKER_CLI_EXPERIMENTAL: "enabled" DOCKER_CLI_EXPERIMENTAL: "enabled"
outputs: outputs:
+3
View File
@@ -16,6 +16,9 @@ on:
# For jobs that don't run on draft PRs. # For jobs that don't run on draft PRs.
- ready_for_review - ready_for_review
permissions:
contents: read
# Only run one instance per PR to ensure in-order execution. # Only run one instance per PR to ensure in-order execution.
concurrency: pr-${{ github.ref }} concurrency: pr-${{ github.ref }}
+3
View File
@@ -8,6 +8,9 @@ on:
description: "PR number" description: "PR number"
required: true required: true
permissions:
contents: read
jobs: jobs:
cleanup: cleanup:
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"