-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (55 loc) · 1.75 KB
/
pr-detect-breaking-changes-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
60
61
62
63
64
65
66
67
68
69
name: PR detect breaking changes
on: pull_request
jobs:
build:
name: Detect
runs-on: ubuntu-latest
env:
GITHUB_STEP_NUMBER: 7
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
ref: 'main'
path: grafana-current
- name: Setup environment
uses: actions/[email protected]
with:
node-version: '16'
- name: Get link for the Github Action job
id: job
uses: actions/github-script@v5
with:
script: |
const script = require('./.github/workflows/scripts/pr-get-job-link.js')
await script({github, context, core})
- name: Install dependencies
run: yarn install --immutable
- name: Install dependencies
run: |
cd grafana-current
yarn install --immutable
- name: Build packages
run: yarn packages:build
- name: Build packages
run: |
cd grafana-current
yarn packages:build
- name: Detect breaking changes
id: breaking-changes
run: ./scripts/check-breaking-changes.sh
env:
FORCE_COLOR: 3
GITHUB_JOB_LINK: ${{ steps.job.outputs.link }}
- name: Persisting the check output
run: |
mkdir -p ./levitate
echo "{ \"exit_code\": ${{ steps.breaking-changes.outputs.is_breaking }}, \"message\": \"${{ steps.breaking-changes.outputs.message }}\", \"job_link\": \"${{ steps.job.outputs.link }}#step:${GITHUB_STEP_NUMBER}:1\" }" > ./levitate/result.json
- name: Upload check output as artifact
uses: actions/upload-artifact@v2
with:
name: levitate
path: levitate/
- name: Exit
run: exit ${{ steps.breaking-changes.outputs.is_breaking }}
shell: bash