Skip to content

Commit 8607855

Browse files
committed
Add Action to run analysis on PRs as well as normal pushes
1 parent c807200 commit 8607855

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/main.workflow

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
workflow "PSScriptAnalyzer" {
1+
workflow "script-analysis" {
22
resolves = ["analyze"]
33
on = "push"
44
}
55

6+
workflow "pr-script-analysis" {
7+
on = "pull_request"
8+
resolves = "analyze-pr"
9+
}
10+
11+
action "filter-to-pr-open-synced" {
12+
uses = "actions/bin/filter@master"
13+
args = "action 'opened|synchronize'"
14+
}
15+
16+
action "analyze-pr" {
17+
uses = "./analyze"
18+
needs = "filter-to-pr-open-synced"
19+
secrets = ["GITHUB_TOKEN"]
20+
}
21+
622
action "analyze" {
723
uses = "./analyze"
824
secrets = ["GITHUB_TOKEN"]

0 commit comments

Comments
 (0)