Skip to content

Commit

Permalink
update master, notify pr
Browse files Browse the repository at this point in the history
  • Loading branch information
LesnyRumcajs committed Dec 13, 2022
1 parent 058ac8b commit 2398954
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 24 deletions.
53 changes: 30 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,38 +107,45 @@ jobs:
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
with:
files: lcov.info
# Check if the bundle size was committed and is up-to-date
# Lint shell scripts
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run shellcheck
uses: ludeeus/[email protected]
bundle-size:
runs-on: ubuntu-latest
steps:
- name: Checking out
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: ./.github/actions/rust-cargo-run
with:
command: version
github_token: ${{ secrets.GITHUB_TOKEN }}
save_cache: true
- name: Update bundle size
- name: Show bundle delta summary
id: bundle-summary
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
make bundle-size
git add bundle-size
git commit -m "[skip ci] update bundle-size" || true
- name: Push changes
uses: ad-m/github-push-action@master
echo 'bundle-summary<<EOF' >> $GITHUB_ENV
make bundle-size | tail -n3 >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
# Lint shell scripts
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run shellcheck
uses: ludeeus/[email protected]
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-regex: "^### WASM bundle size$"
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
### WASM bundle size
${{ steps.env.bundle-summary }}
edit-mode: replace
35 changes: 35 additions & 0 deletions .github/workflows/update-bundle-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Update WASM bundle size

on:
push:
branches:
- master

# Check if the bundle size was committed and is up-to-date
jobs:
bundle-size:
runs-on: ubuntu-latest
steps:
- name: Checking out
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Install Rust toolchain
uses: ./.github/actions/rust-cargo-run
with:
command: version
github_token: ${{ secrets.GITHUB_TOKEN }}
save_cache: true
- name: Update bundle size
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
make bundle-size
git add bundle-size
git commit -m "[skip ci] update bundle-size" || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
2 changes: 1 addition & 1 deletion bundle-size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6030520
6033977

0 comments on commit 2398954

Please sign in to comment.