generated from credfeto/cs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.53 KB
/
merge-dependabot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "Dependabot: Merge actions updates in template repos"
on:
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests
# could and should work, at least for public repos;
# tracking issue for this action's issue:
# https://github.com/ahmadnassri/action-dependabot-auto-merge/issues/60
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
status: { }
jobs:
auto_merge_dependabot:
if: |-
${{endsWith(github.repository, '-template') &&
startsWith(github.head_ref, 'dependabot/github_actions/')}}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
# Specifically check that dependabot (or another trusted party) created this pull-request, and that it has been labelled correctly.
steps:
- run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE"
- run: echo "${{github.repository_owner}}"
- if: github.repository_owner == 'funfair-tech'
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: ${{secrets.SOURCE_PUSH_TOKEN}}
MERGE_METHOD: merge
MERGE_COMMIT_MESSAGE: pull-request-title-and-description
MERGE_REQUIRED_APPROVALS: 1
MERGE_DELETE_BRANCH: true
MERGE_FORKS: false
MERGE_LABELS: github-actions
UPDATE_RETRIES: 10