Skip to content

Commit

Permalink
Add SkipIfOnlyChanged…
Browse files Browse the repository at this point in the history
… to skip building if we are only editing some files that do not
affect the tasks.

Signed-off-by: Vincent Demeester <[email protected]>
  • Loading branch information
vdemeester committed Dec 7, 2023
1 parent 33afabf commit 8a4da2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/prowgen/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import (
prowv1 "k8s.io/test-infra/prow/apis/prowjobs/v1"
)

var skipIfOnlyChanged = "^(LICENSE|OWNERS|README\.md|\.gitignore|\.goreleaser\.yaml)$|^docs/|^subsystem/|^examples/\^.github/"

Check failure on line 20 in internal/prowgen/config.go

View workflow job for this annotation

GitHub Actions / generate-ci

unknown escape

type Repository struct {
Repo string `json:"repository" yaml:"repository"`
Branches []string `json:"branches" yaml:"branches"`
Expand Down Expand Up @@ -257,6 +259,7 @@ func generateTestFromConfig(repo *Repository) ([]cioperatorapi.TestStepConfigura
}},
Workflow: stringPtr("generic-claim"),
},
SkipIfOnlyChanged: skipIfOnlyChanged,
})
}
default:
Expand Down

0 comments on commit 8a4da2f

Please sign in to comment.