-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (63 loc) · 2.49 KB
/
combine-dependabot-prs.yml
File metadata and controls
67 lines (63 loc) · 2.49 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: "Combine PRs"
on:
workflow_call:
inputs:
branchPrefix:
description: "Branch prefix to find combinable PRs based on"
default: "dependabot"
type: string
mustBeGreen:
description: "Only combine PRs that are green (status is success)"
default: true
type: boolean
combineBranchName:
description: "Name of the branch to combine PRs into"
default: "combine-dependabot-PRs"
type: string
ignoreLabel:
description: "Exclude PRs with this label"
default: "nocombine"
type: string
# Allow manual triggering of the workflow for this repo
workflow_dispatch:
inputs:
branchPrefix:
description: "Branch prefix to find combinable PRs based on"
default: "dependabot"
type: string
mustBeGreen:
description: "Only combine PRs that are green (status is success)"
default: true
type: boolean
combineBranchName:
description: "Name of the branch to combine PRs into"
default: "combine-dependabot-PRs"
type: string
ignoreLabel:
description: "Exclude PRs with this label"
default: "nocombine"
type: string
jobs:
combine-prs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
repository: NHSDigital/eps-common-workflows
sparse-checkout-cone-mode: false
sparse-checkout: |
combine-prs.js
- name: Create Combined PR
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
id: create-combined-pr
env:
branchPrefix: ${{ inputs.branchPrefix }}
mustBeGreen: ${{ inputs.mustBeGreen }}
combineBranchName: ${{ inputs.combineBranchName }}
ignoreLabel: ${{ inputs.ignoreLabel }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const combinePRs = require('./combine-prs.js');
await combinePRs({ github, context, core });