-
-
Notifications
You must be signed in to change notification settings - Fork 15
59 lines (58 loc) · 1.88 KB
/
ci-base-build.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ hashFiles('package.json') }}-
${{ runner.OS }}-build-
- run: npm install
- run: npm run build
- run: npm run test
- run: npm run lint:report
continue-on-error: true
- uses: actions/upload-artifact@v4
with:
name: result
path: |
eslint_report.json
- run: npm run pack
if: github.event_name != 'pull_request'
- name: Create Pull Request
if: github.event_name != 'pull_request'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.MEILCLI_BOT }}
commit-message: 'update actions'
title: 'update actions'
labels: 'Action'
assignees: 'MeilCli'
branch: 'update/action'
- uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-build-gems-${{ hashFiles('.github/Gemfile') }}
restore-keys: |
${{ runner.os }}-build-gems-
- uses: ./
# not run on pull request, because cannot access secret from pull request by forked reposiotry
if: github.event_name != 'pull_request'
with:
plugins_file: '.github/Gemfile'
install_path: 'vendor/bundle'
danger_file: '.github/Dangerfile'
danger_id: 'danger-build'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}