Skip to content

Commit 845e194

Browse files
authored
Update build.yml
1 parent f59d949 commit 845e194

File tree

1 file changed

+20
-24
lines changed

1 file changed

+20
-24
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,28 @@ jobs:
1212
- name: Setup enviroment
1313
uses: scipion-chem/.github/.github/composites/install-scipion@main
1414

15-
# Checkout to Pull Request branch if exists
16-
- name: Install scipion-chem (in branch ${{ github.head_ref }} if exists)
17-
working-directory: ${{ github.workspace }}/../
18-
env:
19-
REPO_NAME: scipion-chem
20-
BRANCH_NAME: ${{ github.head_ref }}
21-
run: |
22-
git clone https://github.com/scipion-chem/$REPO_NAME.git
23-
if [ $(git ls-remote --heads https://github.com/scipion-chem/$REPO_NAME.git $BRANCH_NAME | wc -l) -eq 1 ]; then
24-
cd $REPO_NAME && git checkout $BRANCH_NAME && cd -
25-
fi
26-
scipion/scipion3 installp -p $REPO_NAME --devel
27-
28-
# Checkout to Pull Request branch if exists
29-
- name: Install scipion-chem-autodock (in branch ${{ github.head_ref }} if exists)
15+
- name: Clone scipion-chem (in branch ${{ github.head_ref }} if exists, then tries ${{ github.base_ref }}, finally, default branch)
16+
uses: scipion-chem/.github/.github/composites/clone-in-branch@main
17+
with:
18+
path: ${{ github.workspace }}/../
19+
repo_url: https://github.com/scipion-chem/scipion-chem
20+
prioritized_branches: "${{ github.head_ref }},${{ github.base_ref }}"
21+
22+
- name: Install scipion-chem
3023
working-directory: ${{ github.workspace }}/../
31-
env:
32-
REPO_NAME: scipion-chem-autodock
33-
BRANCH_NAME: ${{ github.head_ref }}
34-
run: |
35-
git clone https://github.com/scipion-chem/$REPO_NAME.git
36-
if [ $(git ls-remote --heads https://github.com/scipion-chem/$REPO_NAME.git $BRANCH_NAME | wc -l) -eq 1 ]; then
37-
cd $REPO_NAME && git checkout $BRANCH_NAME && cd -
38-
fi
39-
scipion/scipion3 installp -p $REPO_NAME --devel
24+
run: scipion/scipion3 installp -p scipion-chem/ --devel
25+
26+
- name: Clone scipion-chem-autodock (in branch ${{ github.head_ref }} if exists, then tries ${{ github.base_ref }}, finally, default branch)
27+
uses: scipion-chem/.github/.github/composites/clone-in-branch@main
28+
with:
29+
path: ${{ github.workspace }}/../
30+
repo_url: https://github.com/scipion-chem/scipion-chem-autodock
31+
prioritized_branches: "${{ github.head_ref }},${{ github.base_ref }}"
4032

33+
- name: Install scipion-chem-autodock
34+
working-directory: ${{ github.workspace }}/../
35+
run: scipion/scipion3 installp -p scipion-chem-autodock/ --devel
36+
4137
- name: Checkout repository
4238
uses: actions/checkout@main
4339
with:

0 commit comments

Comments
 (0)