Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run different analysis job for fork #62

Merged
merged 1 commit into from
Jul 30, 2024
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: 3 additions & 1 deletion .github/workflows/bundle-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ on:
pull_request_target:
branches: [main]


jobs:
bundle-analysis:
bundle-analysis-from-fork:
permissions:
contents: read # for checkout repository
actions: read # for fetching base branch bundle stats
pull-requests: write # for comments
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event.pull_request.user.login == 'exoego'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/ci-from-fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI (from fork)
on:
push:
branches: [main]
paths-ignore:
- '*.md'
pull_request_target:
branches: [main]


jobs:
bundle-analysis-from-fork:
permissions:
contents: read # for checkout repository
actions: read # for fetching base branch bundle stats
pull-requests: write # for comments
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event.pull_request.user.login != 'exoego'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- run: npm ci
- run: npm run build
- name: Analyze esbuild bundle size
uses: jenseng/dynamic-uses@5175289a9a87978dcfcb9cf512b821d23b2a53eb
with:
uses: exoego/esbuild-bundle-analyzer@${{ github.sha }}
with: '{"metafiles": "tmp/meta.json"}'
- uses: actions/upload-artifact@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
name: distribution
path: |
dist/
action.yaml
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,32 @@ jobs:
else
echo 'clean'
fi

bundle-analysis:
permissions:
contents: read # for checkout repository
actions: read # for fetching base branch bundle stats
pull-requests: write # for comments
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event.pull_request.user.login == 'exoego'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- run: npm ci
- run: npm run build
- name: Analyze esbuild bundle size
uses: jenseng/dynamic-uses@5175289a9a87978dcfcb9cf512b821d23b2a53eb
with:
uses: exoego/esbuild-bundle-analyzer@${{ github.sha }}
with: '{"metafiles": "tmp/meta.json"}'
- uses: actions/upload-artifact@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
name: distribution
path: |
dist/
action.yaml
4 changes: 2 additions & 2 deletions dist/index.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/compare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ function markdownTable(
.join("");

return `
Meta File | Out File | Size (raw) | Note
Meta File | Out File | Size (raw) | Note
----------|----------|-----------:|------
${rows}`;
}
Expand Down
Loading