chore(ci): add logic for choosing correct runner for cypress tests depending on base branch (#4918)

This commit is contained in:
Radosław Szpiech 2023-09-28 11:25:44 +02:00 committed by GitHub
parent 7ac3a68ac9
commit b761023069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,13 +13,28 @@ on:
type: string
jobs:
runner-choice:
runs-on: ubuntu-latest
outputs:
runner: ${{ steps.step.outputs.runner }}
steps:
- name: Check branch
id: step
run: |
if [ ${{ github.base_ref }} == 'main' ]; then
echo "runner=mainnet-compatible-runner" >> $GITHUB_OUTPUT
else
echo "runner=self-hosted-runner" >> $GITHUB_OUTPUT
fi
e2e:
strategy:
fail-fast: false
matrix:
project: ${{ fromJSON(inputs.projects) }}
name: ${{ matrix.project }}
runs-on: mainnet-compatible-runner
needs: runner-choice
runs-on: ${{ needs.runner-choice.outputs.runner }}
timeout-minutes: 120
steps:
# Checks if skip cache was requested