From 70b2113985cf2cfc0b11187dace0fac5cb227f7a Mon Sep 17 00:00:00 2001 From: LongYinan Date: Wed, 14 Oct 2020 22:08:16 +0800 Subject: [PATCH] ci: benchmark result upload condition --- .github/workflows/bench.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bench.yaml b/.github/workflows/bench.yaml index 1535c312..b6d6b51b 100644 --- a/.github/workflows/bench.yaml +++ b/.github/workflows/bench.yaml @@ -1,6 +1,9 @@ name: Benchmark on: + push: + branches: + - master pull_request: jobs: @@ -62,12 +65,20 @@ jobs: - name: Store benchmark result uses: rhysd/github-action-benchmark@v1 + if: github.ref == 'refs/heads/master' with: tool: 'benchmarkjs' output-file-path: bench.txt - comment-on-alert: true github-token: ${{ secrets.GH_TOKEN }} auto-push: true + + - name: Store benchmark result + uses: rhysd/github-action-benchmark@v1 + if: github.ref != 'refs/heads/master' + with: + tool: 'benchmarkjs' + output-file-path: bench.txt + github-token: ${{ secrets.GH_TOKEN }} comment-always: true - name: Clear the cargo caches