add filter to exclude merged PRs

... due to double-push events that occur when a PR is merged
This commit is contained in:
Jeff Billimek 2019-05-26 16:33:17 -04:00 committed by GitHub
parent 9f95ce7d52
commit 98f572ef60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

12
.github/main.workflow vendored
View File

@ -1,6 +1,7 @@
workflow "Lint & Publish Helm chart" { workflow "Lint & Publish Helm chart" {
resolves = [ resolves = [
"Package Helm Chart(s)", "Package Helm Chart(s)",
"Filter for non-merged PRs",
] ]
on = "push" on = "push"
} }
@ -9,7 +10,7 @@ action "Package Helm Chart(s)" {
uses = "billimek/gh-actions/helm-gh-pages@master" uses = "billimek/gh-actions/helm-gh-pages@master"
args = "https://billimek.com/billimek-charts/" args = "https://billimek.com/billimek-charts/"
secrets = ["GITHUB_TOKEN"] secrets = ["GITHUB_TOKEN"]
needs = ["Filter for master "] needs = ["Filter for non-merged PRs"]
} }
workflow "Pull Request" { workflow "Pull Request" {
@ -25,8 +26,15 @@ action "Pull Request Linting" {
secrets = ["GITHUB_TOKEN"] secrets = ["GITHUB_TOKEN"]
} }
action "Filter for master " { action "Filter for master" {
uses = "actions/bin/filter@master" uses = "actions/bin/filter@master"
args = "branch master" args = "branch master"
secrets = ["GITHUB_TOKEN"] secrets = ["GITHUB_TOKEN"]
} }
action "Filter for non-merged PRs" {
uses = "actions/bin/filter@master"
needs = ["Filter for master"]
args = "not merged true"
secrets = ["GITHUB_TOKEN"]
}