Skip to content

Commit bda3296

Browse files
authored
feat: test pull request against plugin building (#172)
1 parent 53da359 commit bda3296

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/build-plugin.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,41 @@
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+
14
name: plugin-build
25

36
on:
47
push:
5-
branches: [main]
6-
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
712
workflow_dispatch:
813

914
jobs:
1015
build:
1116
runs-on: ubuntu-latest
12-
17+
1318
permissions:
1419
contents: write
15-
20+
1621
steps:
1722
- uses: actions/checkout@v4
18-
23+
1924
- name: Use Node.js
2025
uses: actions/setup-node@v4
2126
with:
2227
node-version: 18.x
23-
28+
2429
- name: Install dependencies
2530
working-directory: ./resources/js/
2631
run: npm install
27-
32+
2833
- name: Build plugin
2934
working-directory: ./resources/js/
3035
run: npm run plugin:build
31-
36+
3237
- name: Commit changes
38+
if: github.event_name != 'pull_request'
3339
uses: stefanzweifel/git-auto-commit-action@v5
3440
with:
3541
commit_message: Build plugin

0 commit comments

Comments
 (0)