Unverified Commit 7267ceee authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[ci] Populate GITHUB_TOKEN for auto-labeler (#93219)

parent 0fdd6902
...@@ -4,11 +4,13 @@ description: >- ...@@ -4,11 +4,13 @@ description: >-
the config in this action's src/config.json. the config in this action's src/config.json.
# This action deliberately has no inputs. It reads `GITHUB_TOKEN` from the # This action deliberately has no inputs. It reads `GITHUB_TOKEN` from the
# environment, which GitHub Actions populates with the job's own token. # environment, which the calling workflow must set via `env:` — typically
# Exposing a `github-token` input would let callers pass an unrelated # to `${{ secrets.GITHUB_TOKEN }}`, the job's own token scoped by the
# (potentially higher-privileged) token from a fork-controlled context; # workflow's `permissions:` block. Exposing a `github-token` input would
# forcing the use of the job token keeps the principle of least privilege # let callers pass an unrelated (potentially higher-privileged) token from
# tied to the workflow's declared `permissions:` block. # a fork-controlled context; forcing the use of the job token via `env:`
# keeps the principle of least privilege tied to the workflow's declared
# `permissions:` block.
runs: runs:
using: 'node24' using: 'node24'
main: 'dist/index.js' main: 'dist/index.js'
...@@ -59,9 +59,9 @@ jobs: ...@@ -59,9 +59,9 @@ jobs:
if: github.repository_owner == 'vercel' if: github.repository_owner == 'vercel'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
# To checkout the action
contents: read
# To add labels # To add labels
pull-requests: write pull-requests: write
steps: steps:
- uses: vercel/next.js/.github/actions/pr-auto-label@canary - uses: vercel/next.js/.github/actions/pr-auto-label@canary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment