Open chenejac opened 1 year ago
I believe the following variables can be used for pull_requests - github.ref, github.base_ref, github.head_ref.
Can we make one generic solution working building for push, pull_request and workflow_dispatch by using naming convention? Or we need different GitHub actions for build?
Is your feature request related to a problem? Please describe. The VIVO build action is always cloning main branch of vivo-project/Vitro repository - https://github.com/vivo-project/VIVO/blob/main/.github/workflows/build.yml#L16. In some cases it is failing, although the pair of VIVO and Vitro PR which are together resolving some issue can build together.
Describe the solution you'd like One solution might be based on naming convention.
A VIVO PR is defined by using source repository owner/organization, source repository name (VIVO), and source branch name, on target repository owner/organization, target repository name (VIVO), and target branch name. For instance, in the case of this PR:
The line https://github.com/vivo-project/VIVO/blob/main/.github/workflows/build.yml#L16 should be replaced with script representing the following pseudo code:
git clone -b {source branch name} --single-branch https://github.com/{source repository owner/organization}/Vitro.git ../Vitro
git clone -b {target branch name} --single-branch https://github.com/{target repository owner/organization}/Vitro.git ../Vitro
git clone -b https://github.com/{target repository owner/organization}/Vitro.git ../Vitro
LIMITATION: Naming convention is needed:
Describe alternatives you've considered