1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-07-12 22:21:40 +02:00

Add support for path-prefix condition (#174)

Example:
```yaml
when:
  path: '*.md'
```

should match only builds in which the commit added/removed or modified files with the *.md extension

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Alex Eftimie
2021-06-28 23:50:35 +02:00
committed by GitHub
parent 978d666eac
commit 2ff91e6a05
18 changed files with 373 additions and 51 deletions

View File

@ -192,6 +192,14 @@ var migrations = []struct {
name: "update-table-set-repo-fallback-again",
stmt: updateTableSetRepoFallbackAgain,
},
{
name: "add-builds-changed_files-column",
stmt: addBuildsChangedfilesColumn,
},
{
name: "update-builds-set-changed_files",
stmt: updateBuildsSetChangedfiles,
},
}
// Migrate performs the database migration. If the migration fails
@ -727,3 +735,15 @@ UPDATE repos SET repo_fallback='false'
var updateTableSetRepoFallbackAgain = `
UPDATE repos SET repo_fallback='false'
`
//
// 025_add_builds_changed_files_column.sql
//
var addBuildsChangedfilesColumn = `
ALTER TABLE builds ADD COLUMN changed_files TEXT;
`
var updateBuildsSetChangedfiles = `
UPDATE builds SET changed_files='[]'
`