From 0bdb9a5eb1807e4b23842d180f763c2506a59880 Mon Sep 17 00:00:00 2001 From: Ariel Juodziukynas Date: Wed, 5 Oct 2022 10:23:26 -0300 Subject: [PATCH 1/2] Set the SHARE env variable only if current branch is main --- .github/workflows/benchmarks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 4019afd..b054a0e 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -10,7 +10,7 @@ jobs: rake: runs-on: ubuntu-latest env: - SHARE: "1" + SHARE: ${{ github.ref_name == 'main' && '1' || '' }} strategy: matrix: From aa4e792025d2c116430f0166be3028fabeb7c1a0 Mon Sep 17 00:00:00 2001 From: Ariel Juodziukynas Date: Wed, 5 Oct 2022 10:36:53 -0300 Subject: [PATCH 2/2] Set the env only if main --- .github/workflows/benchmarks.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index b054a0e..71ed1f7 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -9,8 +9,6 @@ on: jobs: rake: runs-on: ubuntu-latest - env: - SHARE: ${{ github.ref_name == 'main' && '1' || '' }} strategy: matrix: @@ -19,6 +17,10 @@ jobs: 'jruby-head'] steps: + - name: Set Share Env + if: github.ref_name == 'main' + run: | + echo "SHARE=1" >> $GITHUB_ENV - uses: actions/checkout@v3 - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@v1