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
10 changes: 7 additions & 3 deletions .github/workflows/reusable-dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ on:
required: false
default: true
type: boolean
secrets:
REPO_ADMIN_TOKEN:
description: "PAT with repo access (recommended). Ensures branch updates trigger downstream workflows; falls back to GITHUB_TOKEN if unset."
required: false

permissions: {}

Expand Down Expand Up @@ -72,7 +76,7 @@ jobs:
env:
PR_URL: ${{ inputs.pr_url }}
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.REPO_ADMIN_TOKEN != '' && secrets.REPO_ADMIN_TOKEN || github.token }}
run: |
set -euo pipefail
gh pr update-branch --repo "$GH_REPO" --rebase "$PR_URL" || true
Expand All @@ -83,7 +87,7 @@ jobs:
env:
PR_URL: ${{ inputs.pr_url }}
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.REPO_ADMIN_TOKEN != '' && secrets.REPO_ADMIN_TOKEN || github.token }}
run: |
set -euo pipefail
gh pr review --repo "$GH_REPO" --approve "$PR_URL" --body "Auto-approved Dependabot PR." || true
Expand All @@ -93,7 +97,7 @@ jobs:
env:
PR_URL: ${{ inputs.pr_url }}
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.REPO_ADMIN_TOKEN != '' && secrets.REPO_ADMIN_TOKEN || github.token }}
run: |
set -euo pipefail
method="${{ inputs.merge_method }}"
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/reusable-dependabot-refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ on:
required: false
default: true
type: boolean
secrets:
REPO_ADMIN_TOKEN:
description: "PAT with repo access (recommended). Ensures branch updates trigger downstream workflows; falls back to GITHUB_TOKEN if unset."
required: false

permissions: {}

Expand All @@ -75,7 +79,7 @@ jobs:
id: list
shell: bash
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.REPO_ADMIN_TOKEN != '' && secrets.REPO_ADMIN_TOKEN || github.token }}
GH_REPO: ${{ github.repository }}
BASE_BRANCH: ${{ inputs.base_branch }}
run: |
Expand Down Expand Up @@ -105,7 +109,7 @@ jobs:
if: steps.list.outputs.count != '0' && inputs.update_branch
shell: bash
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.REPO_ADMIN_TOKEN != '' && secrets.REPO_ADMIN_TOKEN || github.token }}
GH_REPO: ${{ github.repository }}
run: |
set -euo pipefail
Expand All @@ -118,7 +122,7 @@ jobs:
if: steps.list.outputs.count != '0' && inputs.approve_prs
shell: bash
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.REPO_ADMIN_TOKEN != '' && secrets.REPO_ADMIN_TOKEN || github.token }}
GH_REPO: ${{ github.repository }}
run: |
set -euo pipefail
Expand All @@ -131,7 +135,7 @@ jobs:
if: steps.list.outputs.count != '0' && inputs.enable_auto_merge
shell: bash
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.REPO_ADMIN_TOKEN != '' && secrets.REPO_ADMIN_TOKEN || github.token }}
GH_REPO: ${{ github.repository }}
MERGE_METHOD: ${{ inputs.merge_method }}
run: |
Expand Down