Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/diff-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,66 @@ on:
pull_request:

jobs:
build-main:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: main
- name: Use Node v${{ matrix.node-version }}
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 24.x
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Pack
run: npm pack
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: base-packages
path: '*.tgz'
build-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Use Node v${{ matrix.node-version }}
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 24.x
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Pack
run: npm pack
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: source-packages
path: '*.tgz'
diff_dependencies:
runs-on: ubuntu-latest
needs: [build-main, build-pr]
permissions:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: base-packages
path: ./base-packages
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: source-packages
path: ./source-packages
- name: Create Diff
uses: ./
with:
base-packages: ./base-packages/*.tgz
source-packages: ./source-packages/*.tgz
10 changes: 10 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ inputs:
description: 'Threshold (in bytes) for warning about significant increase in package size'
required: false
default: '100000'
base-packages:
description: 'Glob pattern for base branch pack files (e.g., "./base-packs/*.tgz")'
required: false
source-packages:
description: 'Glob pattern for source branch pack files (e.g., "./source-packs/*.tgz")'
required: false
pack-size-threshold:
description: 'Threshold (in bytes) for warning about significant increase in total pack size'
required: false
default: '50000'

runs:
using: node24
Expand Down
Loading