From f0e38f17f82e5c080998d30651e892df730ce011 Mon Sep 17 00:00:00 2001 From: Alexey Yarmosh Date: Fri, 3 Jan 2025 18:35:03 +0100 Subject: [PATCH] fix: branch name for pull_request trigger --- .github/workflows/e2e.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 533f18b..8d42df2 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -23,10 +23,11 @@ jobs: pnpm install - name: Clone globalping-dash-directus + env: + CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }} run: | - current_branch=$(git rev-parse --abbrev-ref HEAD) - echo "Current branch: $current_branch." - git clone -b $current_branch https://github.com/jsdelivr/globalping-dash-directus.git test/e2e/globalping-dash-directus || git clone https://github.com/jsdelivr/globalping-dash-directus.git test/e2e/globalping-dash-directus + echo "Current branch: ${{ CURRENT_BRANCH }}." + git clone -b ${{ CURRENT_BRANCH }} https://github.com/jsdelivr/globalping-dash-directus.git test/e2e/globalping-dash-directus || git clone https://github.com/jsdelivr/globalping-dash-directus.git test/e2e/globalping-dash-directus - name: Install globalping-dash-directus dependencies working-directory: ./test/e2e/globalping-dash-directus