-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.2 KB
/
build.yml
File metadata and controls
39 lines (36 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Build
id: build
run: |
npm install
echo "version=$(npm run build --silent -- --plain)" >> $GITHUB_OUTPUT
npm update
lint_result="$(npm run lint --silent)"
echo "lint_result=$(if test -n $lint_result; then echo 'No linting errors.'; else echo $lint_result; fi)" >> $GITHUB_OUTPUT
- uses: peter-evans/create-pull-request@v4
with:
add-paths: |
.eslintrc.json
package-lock.json
package.json
commit-message: Sync for Drupal ${{ steps.build.outputs.version }}
branch: build/${{ steps.build.outputs.version }}
title: Sync for Drupal ${{ steps.build.outputs.version }}
body: |
${{ steps.build.outputs.lint_result }}
[See run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
reviewers: wongjn