2022-02-02 14:56:16 +00:00
|
|
|
name: Check Modified Assets
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-trunk:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-23 07:41:43 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-02 14:56:16 +00:00
|
|
|
with:
|
|
|
|
ref: trunk
|
2022-03-23 07:41:43 +00:00
|
|
|
- name: Setup node version and npm cache
|
|
|
|
uses: actions/setup-node@v3
|
2022-02-02 14:56:16 +00:00
|
|
|
with:
|
2022-03-23 07:41:43 +00:00
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
cache: 'npm'
|
2022-02-02 14:56:16 +00:00
|
|
|
- name: npm install and build
|
|
|
|
run: |
|
2022-03-23 07:41:43 +00:00
|
|
|
npm ci --no-optional
|
2022-02-02 14:56:16 +00:00
|
|
|
npm run build:check-assets
|
|
|
|
- name: Upload Artifact
|
2022-03-23 07:41:43 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-02-02 14:56:16 +00:00
|
|
|
with:
|
|
|
|
name: assets-list
|
|
|
|
path: ./build/assets.json
|
|
|
|
|
|
|
|
compare-assets-with-trunk:
|
|
|
|
needs: [build-trunk]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-23 07:41:43 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup node version and npm cache
|
|
|
|
uses: actions/setup-node@v3
|
2022-02-02 14:56:16 +00:00
|
|
|
with:
|
2022-03-23 07:41:43 +00:00
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
cache: 'npm'
|
2022-02-02 14:56:16 +00:00
|
|
|
- name: npm install
|
|
|
|
run: |
|
2022-03-23 07:41:43 +00:00
|
|
|
npm ci --no-optional
|
2022-02-02 14:56:16 +00:00
|
|
|
npm run build:check-assets
|
|
|
|
- name: Download assets (trunk)
|
2022-03-23 07:41:43 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2022-02-02 14:56:16 +00:00
|
|
|
with:
|
|
|
|
name: assets-list
|
|
|
|
path: assets-list
|
|
|
|
- name: Compare Assets
|
|
|
|
uses: ./.github/compare-assets
|
|
|
|
with:
|
|
|
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
|
|
|
compare: assets-list/assets.json
|