Check for orphaned assets in CI (#24074)
This commit is contained in:
30
.github/workflows/orphaned-assets-check.yml
vendored
Normal file
30
.github/workflows/orphaned-assets-check.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: 'Orphaned assets check'
|
||||
|
||||
# **What it does**: Checks that there are no files in ./assets/ that aren't mentioned in any source file.
|
||||
# **Why we have it**: To avoid orphans into the repo.
|
||||
# **Who does it impact**: Docs content.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@04c56d2f954f1e4c69436aa54cfef261a018f458
|
||||
with:
|
||||
node-version: 16.13.x
|
||||
cache: npm
|
||||
|
||||
- name: Install
|
||||
run: npm ci
|
||||
|
||||
- name: Check for orphaned assets
|
||||
run: ./script/find-orphaned-assets.mjs --verbose --exit
|
||||
Reference in New Issue
Block a user