File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ pub fn modified_files(scope: &Scope) -> ModifiedContent {
5858 Scope :: DiffToMain => Some ( "main" . to_owned ( ) ) ,
5959 } ;
6060
61- let files = args. map ( |args| {
61+ let files: Option < Vec < String > > = args. map ( |args| {
6262 let vec = Command :: new ( "git" )
6363 . args ( spread ! [ "diff" . to_owned( ) , "--name-only" . to_owned( ) , args, ] )
6464 . output ( )
@@ -72,6 +72,15 @@ pub fn modified_files(scope: &Scope) -> ModifiedContent {
7272 . map ( |s| format ! ( "./{}" , s) )
7373 . collect ( )
7474 } ) ;
75+
76+ // If something is changed in a Dockerfile, we'd want to run all CI steps, so set `files` to
77+ // `None` in `ModifiedContent`.
78+ if let Some ( ref paths) = files {
79+ if paths. iter ( ) . any ( |path| path. contains ( "Dockerfile" ) ) {
80+ return ModifiedContent { files : None } ;
81+ }
82+ }
83+
7584 ModifiedContent { files }
7685}
7786
You can’t perform that action at this time.
0 commit comments