Skip to content

Commit 0f23c52

Browse files
authored
Merge pull request #151 from orange-cloudfoundry/dependabot-auto-merge-config
update dependabot auto merge config
2 parents 3c49d6b + 04eb1eb commit 0f23c52

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

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

Lines changed: 18 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,26 @@ 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 }}
38+

0 commit comments

Comments
 (0)