Skip to content

Commit

Permalink
Workaround lack of support for slashes in bundlewatch
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalec committed Jul 7, 2021
1 parent 847ee6c commit 1487571
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/bundlewatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- run: git checkout HEAD^

- name: Install npm dependencies
run: npm ci

- name: Build
run: npm run build

# bundlewatch/ci-env does not support slashes in branch names, so we need to parse ref by ourselves to provide CI_BRANCH
- name: Extract branch name
shell: bash
run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Run bundlewatch
run: npx bundlewatch
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
CI_BRANCH: ${{ env.BRANCH_NAME }}
CI_BRANCH_BASE: ${{ github.base_ref || 'trunk' }}

0 comments on commit 1487571

Please sign in to comment.