forked from grafana.jool/grafana-jool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.5 KiB
54 lines
1.5 KiB
name: Levitate / Detect breaking changes
|
|
|
|
on: pull_request
|
|
|
|
jobs:
|
|
build:
|
|
name: Detect
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GITHUB_STEP_NUMBER: 7
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup environment
|
|
uses: actions/setup-node@v2
|
|
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: Build packages
|
|
run: 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
|
|
|