https://github.com/lironer/bundlemon-action
A free open-source GitHub action that helps you to monitor your bundle size on every commit and alerts you on changes.
https://github.com/lironer/bundlemon-action
bundlesize github github-actions hacktoberfest monitor size
Last synced: 8 months ago
JSON representation
A free open-source GitHub action that helps you to monitor your bundle size on every commit and alerts you on changes.
- Host: GitHub
- URL: https://github.com/lironer/bundlemon-action
- Owner: LironEr
- License: mit
- Created: 2023-05-19T15:48:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-25T09:53:02.000Z (12 months ago)
- Last Synced: 2024-10-30T02:28:03.262Z (12 months ago)
- Topics: bundlesize, github, github-actions, hacktoberfest, monitor, size
- Language: TypeScript
- Homepage: https://app.bundlemon.dev
- Size: 1.38 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# BundleMon GitHub Action
Easily use [BundleMon](https://github.com/LironEr/bundlemon) to monitor your bundle size on every commit from GitHub Actions
## Inputs
| Name | Required | Default | Description |
| ----------------- | :------: | -------------- | -------------------------------------------------------------------------------------------------------------------- |
| bundlemon-args | - | | Optional args for [BundleMon cli](https://github.com/LironEr/bundlemon#cli-usage). Example: --subProject "some-name" |
| bundlemon-version | - | Latest version | BundleMon cli version |
| working-directory | - | | The working directory |
| fail-on-error | - | `true` | Should fail on error |## Usage
BundleMon config must be present to run this action, See [BundleMon setup](https://github.com/LironEr/bundlemon#setup) for more info.
```yaml
name: Buildon:
push:
branches: [main]
pull_request:
types: [synchronize, opened, reopened]jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'- name: Install dependencies
run: yarn- name: Build
run: yarn build- name: BundleMon
uses: lironer/bundlemon-action@v1
```### Example run BundleMon on multiple projects
```yaml
name: Buildon:
push:
branches: [main]
pull_request:
types: [synchronize, opened, reopened]jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'- name: Install dependencies
run: yarn- name: Build
run: yarn build- name: BundleMon Project A
uses: lironer/bundlemon-action@v1
with:
bundlemon-args: --config project-a-config.json --subProject "project-a"- name: BundleMon Project B
uses: lironer/bundlemon-action@v1
with:
bundlemon-args: --config project-b-config.json --subProject "project-b"
```