Skip to content

[pull] master from backstage:master #815

[pull] master from backstage:master

[pull] master from backstage:master #815

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@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
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@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- name: yarn install
uses: backstage/actions/yarn-install@25145dd4117d50e1da9330e9ed2893bc6b75373e # v0.6.15
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: preview-spec
path: |
comment.md
event.json
retention-days: 2
overwrite: true