File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change
1
+ # If it's a pull request, don't build the plugin, just fail if it can't be built
2
+ # If it's a push to main, build the plugin
3
+
1
4
name : plugin-build
2
5
3
6
on :
4
7
push :
5
- branches : [main]
6
-
8
+ branches : [ main ]
9
+ pull_request :
10
+ branches : [ main ]
11
+
7
12
workflow_dispatch :
8
13
9
14
jobs :
10
15
build :
11
16
runs-on : ubuntu-latest
12
-
17
+
13
18
permissions :
14
19
contents : write
15
-
20
+
16
21
steps :
17
22
- uses : actions/checkout@v4
18
-
23
+
19
24
- name : Use Node.js
20
25
uses : actions/setup-node@v4
21
26
with :
22
27
node-version : 18.x
23
-
28
+
24
29
- name : Install dependencies
25
30
working-directory : ./resources/js/
26
31
run : npm install
27
-
32
+
28
33
- name : Build plugin
29
34
working-directory : ./resources/js/
30
35
run : npm run plugin:build
31
-
36
+
32
37
- name : Commit changes
38
+ if : github.event_name != 'pull_request'
33
39
uses : stefanzweifel/git-auto-commit-action@v5
34
40
with :
35
41
commit_message : Build plugin
You can’t perform that action at this time.
0 commit comments