Skip to content

Commit 66e86f3

Browse files
authored
Merge pull request #150 from orange-cloudfoundry/auto-accept-dependabot-token-update
Update auto-accept-dependabot.yml
2 parents 23bfb6f + 2cc23ed commit 66e86f3

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/auto-accept-dependabot.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: auto-accept-dependabot
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [opened, synchronize, reopened]
66

77
permissions:
@@ -13,10 +13,25 @@ jobs:
1313
if: github.actor == 'dependabot[bot]'
1414
runs-on: ubuntu-latest
1515
steps:
16+
- name: Debug auth source (non-sensitive)
17+
run: |
18+
if [ -n "${{ secrets.AUTO_MERGE_TOKEN }}" ]; then
19+
echo "GH auth source: secrets.AUTO_MERGE_TOKEN"
20+
elif [ -n "${{ secrets.GITHUB_TOKEN }}" ]; then
21+
echo "GH auth source: secrets.GITHUB_TOKEN"
22+
elif [ -n "${{ github.token }}" ]; then
23+
echo "GH auth source: github.token"
24+
else
25+
echo "::error::No token available for gh CLI"
26+
exit 1
27+
fi
28+
echo "Actor: ${{ github.actor }}"
29+
echo "Event: ${{ github.event_name }}"
30+
1631
- name: Approve and Enable Auto-Merge
1732
run: |
1833
gh pr review --approve "$PR_URL"
1934
gh pr merge --auto --squash "$PR_URL"
2035
env:
2136
PR_URL: ${{ github.event.pull_request.html_url }}
22-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
GH_TOKEN: ${{ secrets.AUTO_MERGE_TOKEN || secrets.GITHUB_TOKEN || github.token }}

0 commit comments

Comments
 (0)