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
4 changes: 2 additions & 2 deletions .github/workflows/bundle-size-trusted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
}
}
const fs = require('fs');
const sizes = parseDuOutput(fs.readFileSync('sizes-master.txt', 'utf8'));
const sizesPR = parseDuOutput(fs.readFileSync(`sizes-${${{ toJson(github.event.workflow_run.head_branch) }}}.txt`, 'utf8'));
const sizes = parseDuOutput(fs.readFileSync('sizes-base.txt', 'utf8'));
const sizesPR = parseDuOutput(fs.readFileSync('sizes-head.txt', 'utf8'));
core.summary.addHeading('📊 Package size report', '3');
core.summary.addTable([
['Package', 'Before', 'After'].map((data) => ({ data, header: true })),
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/bundle-size-untrusted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ jobs:
if [[ "${{ matrix.branch }}" == "base" ]]; then
echo "ref=${{ github.base_ref }}" >> $GITHUB_OUTPUT
echo "repo=${{ github.repository }}" >> $GITHUB_OUTPUT
echo "branch_name=${{ github.base_ref }}" >> $GITHUB_OUTPUT
else
echo "ref=${{ github.event.pull_request.head.ref }}" >> $GITHUB_OUTPUT
echo "repo=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_OUTPUT
echo "branch_name=${{ github.event.pull_request.head.ref }}" >> $GITHUB_OUTPUT
fi

- name: Checkout ${{ matrix.branch }} branch
Expand All @@ -50,10 +48,10 @@ jobs:

- name: Collect sizes in bytes
id: sizes
run: du -sb packages/*/dist > sizes-${{ steps.vars.outputs.branch_name }}.txt
run: du -sb packages/*/dist > sizes-${{ matrix.branch }}.txt

- name: Upload the sizes
uses: actions/upload-artifact@v4
with:
name: sizes-${{ steps.vars.outputs.branch_name }}
path: sizes-${{ steps.vars.outputs.branch_name }}.txt
name: sizes-${{ matrix.branch }}
path: sizes-${{ matrix.branch }}.txt
Loading