diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 033bfab6e..f5f790fb2 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -8,6 +8,11 @@ jobs: name: benchmark current runs-on: ubuntu-latest steps: + - run: | + echo ${{ gihub.base_ref }} > base_ref + if [[ ! -s base_ref ]]; then + echo 'no-target' > base_ref + fi - uses: actions/checkout@v2 with: ref: ${{ github.base_ref }} @@ -15,7 +20,7 @@ jobs: with: node-version: 12 - run: npm i - - run: npm run bench | tee ${{ github.base_ref }}.txt + - run: npm run bench | tee $(basename $(cat base_ref)).txt benchmark_branch: name: benchmark branch @@ -26,4 +31,4 @@ jobs: with: node-version: 12 - run: npm i - - run: npm run bench | tee ${{ github.ref }}.txt + - run: npm run bench | tee $(basename ${{ github.ref }}).txt