Skip to content

Commit

Permalink
ci: push bundle stats to non-master branch (#2262)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Jun 25, 2024
1 parent 34589b8 commit b2b9ff6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/blade-bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
pr-bundle-size:
name: Generate PR Report
runs-on: ubuntu-latest # nosemgrep: non-self-hosted-runner
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' && github.event.head_commit.author.name != 'rzpcibot' }}
steps:
- name: Checkout Codebase
uses: actions/checkout@v4
Expand Down Expand Up @@ -43,6 +43,7 @@ jobs:
uses: actions/checkout@v4
with:
token: ${{ secrets.CI_BOT_TOKEN }}
ref: bundle-size-stats
- name: Use Node v18
uses: actions/setup-node@v4
with:
Expand All @@ -68,5 +69,5 @@ jobs:
git config user.name "rzpcibot"
git add baseBundleSizeStats.json
git commit -m "chore: update bundle size data [skip ci]"
git push
git push origin bundle-size-stats
working-directory: packages/blade
2 changes: 1 addition & 1 deletion packages/blade/scripts/generateBundleDiff.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const generateBundleDiff = async () => {
// Get the base bundle size report from the master branch
const baseBundleStatsURL =
process.env.BASE_BUNDLE_SIZE_STATS_URL ||
'https://raw.githubusercontent.com/razorpay/blade/master/packages/blade/baseBundleSizeStats.json';
'https://raw.githubusercontent.com/razorpay/blade/bundle-size-stats/packages/blade/baseBundleSizeStats.json';
const response = await fetch(baseBundleStatsURL);

// Parse the JSON response if the request is successful
Expand Down

0 comments on commit b2b9ff6

Please sign in to comment.