grafana/.github/workflows/detect-breaking-changes-build.yml
Levente Balogh 8ed5b95f42
Chore: change triggering of the detect-breaking-changes Github flow (#43188)
* chore: only run the breaking-changes flow on pull requests

* chore: run the detect-breaking-changes flow on opening a PR

* chore: use

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* Wip

* trying to get workflow split running.

* trying to trigger workflow.

* trying to trigger.

* Splits levitate job into two workflows.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-01-03 12:48:12 +01:00

50 lines
1.3 KiB
YAML

name: Levitate / Detect breaking changes
on: pull_request
jobs:
build:
name: Detect
runs-on: ubuntu-latest
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 }}
GITHUB_STEP_NUMBER: 7
- name: Persisting the check output
run: |
mkdir -p ./levitate
echo "{ \"exit_code\": ${{ steps.breaking-changes.outputs.is_breaking }}, \"message\": \"${{ steps.breaking-changes.outputs.mesage }}\", \"job_link\": \"${{ steps.job.outputs.link }}\" }" > ./levitate/result.json
- name: Upload check output as artifact
uses: actions/upload-artifact@v2
with:
name: levitate
path: levitate/