File tree 3 files changed +54
-0
lines changed
3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Dangerbot
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ danger :
10
+ name : Danger
11
+ runs-on : self-hosted
12
+ steps :
13
+ - name : Checkout
14
+ uses : actions/checkout@v3
15
+
16
+ - name : Setup Ruby 3.0
17
+ uses : ruby/setup-ruby@v1
18
+ with :
19
+ ruby-version : ' 3.0'
20
+
21
+ - name : Configure cache
22
+ uses : actions/cache@v1
23
+ with :
24
+ path : vendor/bundle
25
+ key : ${{ runner.os }}-gems-${{ hashFiles('Gemfile') }}
26
+ restore-keys : |
27
+ ${{ runner.os }}-gems-
28
+
29
+ - name : Run Danger
30
+ uses : MeilCli/danger-action@v5
31
+ with :
32
+ plugins_file : ' Gemfile'
33
+ install_path : ' vendor/bundle'
34
+ danger_file : ' Dangerfile'
35
+ danger_id : ' danger-pr'
36
+ env :
37
+ DANGER_GITHUB_API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ # -*- mode: ruby -*- vim: set syntax=ruby
2
+ # frozen_string_literal: true
3
+
4
+ if git . commits . any? { |c | c . message =~ /^Merge branch/ }
5
+ fail ( 'Please rebase to get rid of the merge commits in this PR!' )
6
+ message "For more information, please see [man git-rebase](https://git-scm.com/docs/git-rebase)."
7
+ end
8
+
9
+ if !git . modified_files . include? ( "CHANGELOG.md" ) && !has_app_changes
10
+ fail ( "Please include a CHANGELOG entry. \n You can find it at [CHANGELOG.md](https://github.com/hetznercloud/ansible-ipxe-ca/blob/main/CHANGELOG.md)." )
11
+ message "Note, we use [changelogger](https://github.com/MarkusFreitag/changelogger) as changelog tooling."
12
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'danger'
You can’t perform that action at this time.
0 commit comments