Skip to content

[pull] master from backstage:master #1491

[pull] master from backstage:master

[pull] master from backstage:master #1491

name: API Breaking Changes (Trigger)
on:
pull_request:
types: [opened, synchronize, reopened, closed]
paths:
- '**/openapi.yaml'
jobs:
get-backstage-changes:
env:
NODE_OPTIONS: --max-old-space-size=4096
name: Build PR image
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || github.event.action != 'closed' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Fetch the commit that's merged into the base rather than the target ref
# This will let us diff only the contents of the PR, without fetching more history
ref: 'refs/pull/${{ github.event.pull_request.number }}/merge'
- name: fetch base
run: git fetch --depth 1 origin ${{ github.base_ref }}
- name: setup-node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- name: yarn install
uses: backstage/actions/yarn-install@b3c1841fd69e1658ac631afafd0fb140a2309024 # v0.6.17
with:
cache-prefix: linux-v20
- name: breaking changes check
run: |
yarn backstage-repo-tools repo schema openapi diff --since origin/${{ github.base_ref }} > comment.md
- name: clone artifacts to current directory
run: |
cat ${{ github.event_path }} > event.json
- name: Upload Artifacts
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: preview-spec
path: |
comment.md
event.json
retention-days: 2
overwrite: true