Skip to content

Commit

Permalink
fix(ci): Use dynamic repo URL for python26-test (#4314)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Glutexo authored Dec 19, 2024
1 parent 952f219 commit dd934a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dd934a3

Please sign in to comment.