From dd934a3bbf627e2505e15dc06b11b32a8675c351 Mon Sep 17 00:00:00 2001 From: Glutexo Date: Thu, 19 Dec 2024 01:58:26 +0100 Subject: [PATCH] fix(ci): Use dynamic repo URL for python26-test (#4314) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The harcoded RedHatInsights URL makes the Python 2.6 tests fail when a pull request is created in a fork. Using a dynamic URLs makes the GitHub Action to clone from the fork and use the code in the pull request. github.repositoryUrl variable can’t be used, because cloning using git:// protocol fails. HTTPS url is thus composed instead. Card IDs: * RHINENG-14956 Signed-off-by: Štěpán Tomsa --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2082f67875..a38b27c80f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,7 +79,7 @@ jobs: apt-get install -y build-essential git curl unzip file tar - name: clone the repo and checkout pull_request run: | - git clone https://github.com/RedHatInsights/insights-core.git + git clone ${{ github.server_url }}/${{ github.repository }} git -C insights-core fetch --no-tags --prune --no-recurse-submodules --depth=1 origin pull/${{ github.ref_name }}:${{ github.head_ref }} git -C insights-core checkout ${{ github.head_ref }} - name: build setuptools and pip