File tree 1 file changed +30
-6
lines changed
1 file changed +30
-6
lines changed Original file line number Diff line number Diff line change 1
- name : auto approve and tidy
1
+ name : auto approve and merge and tidy
2
2
on :
3
3
pull_request :
4
4
paths :
5
- - ' .github/workflows/gosum.yml'
6
- - ' go.mod'
7
- - ' go.sum'
5
+ - " .github/workflows/gosum.yml"
6
+ - " go.mod"
7
+ - " go.sum"
8
8
9
9
# job level conditions don't seem to work at the moment
10
10
# https://github.community/t5/GitHub-Actions/Status-of-workflows-with-no-running-jobs/td-p/37160
25
25
- name : setup go
26
26
uses : actions/setup-go@v1
27
27
with :
28
- go-version : ' 1.14'
28
+ go-version : " 1.14"
29
29
- name : Tidy
30
30
run : |
31
31
go version
56
56
57
57
if : github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
58
58
with :
59
- github-token : " ${{ secrets.GITHUB_TOKEN }}"
59
+ github-token : " ${{ secrets.GITHUB_TOKEN }}"
60
+ merge :
61
+ name : auto-merge dependabot PRs
62
+ runs-on : ubuntu-latest
63
+ needs : [approve]
64
+ steps :
65
+ - name : " Wait for status checks"
66
+ id : waitforstatuschecks
67
+ uses :
" WyriHaximus/[email protected] "
68
+ with :
69
+ ignoreActions : merge
70
+ checkInterval : 13
71
+ env :
72
+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
73
+ - name : merge
74
+
75
+ if : (github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') && steps.waitforstatuschecks.outputs.status == 'success'
76
+ with :
77
+ script : |
78
+ github.pullRequests.merge({
79
+ owner: context.payload.repository.owner.login,
80
+ repo: context.payload.repository.name,
81
+ pull_number: context.payload.pull_request.number
82
+ })
83
+ github-token : " ${{ secrets.GITHUB_TOKEN }}"
You can’t perform that action at this time.
0 commit comments