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