Skip to content

Commit

Permalink
TEST workflow for pull-request #TASK-6807
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfeSanahuja committed Sep 5, 2024
1 parent f4a286f commit 534106c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/pull-request-approved.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: '10'
## This is important to avoid the error in the next step: "fatal: repository 'https://github.com/zetta-genomics/opencga-enterprise.git/' not found"
persist-credentials: false
- id: get_xetabase_branch
name: "Get current branch for Xetabase from target branch"
run: |
chmod +x ./.github/workflows/scripts/get-xetabase-branch.sh
echo "github.event.pull_request.base.ref: ${{ github.event.pull_request.base.ref }}"
echo "github.event.pull_request.head.ref: ${{ github.event.pull_request.head.ref }}"
echo "secrets.ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}"
xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.head.ref }} ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }})
xetabase_branch=$(./.github/workflows/scripts/get-xetabase-branch.sh ${{ github.event.pull_request.head.ref }})
echo "__Xetabase ref:__ \"${xetabase_branch}\"" | tee -a ${GITHUB_STEP_SUMMARY}
echo "xetabase_branch=${xetabase_branch}" >> $GITHUB_OUTPUT
env:
ZETTA_REPO_ACCESS_TOKEN: ${{ secrets.ZETTA_REPO_ACCESS_TOKEN }}

test:
name: "Run all tests before merging"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/get-xetabase-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ get_xetabase_branch() {
# If the branch begins with 'TASK' and exists in the opencga-enterprise repository, I return it
if [[ $input_branch == TASK* ]]; then
if [ "$(git ls-remote "https://$ZETTA_REPO_ACCESS_TOKEN@github.com/zetta-genomics/opencga-enterprise.git" "$input_branch" )" ] ; then
echo "$input_branch";
echo $input_branch;
return 0;
fi
fi
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-pull-request-approved.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: '10'
## This is important to avoid the error in the next step: "fatal: repository 'https://github.com/zetta-genomics/opencga-enterprise.git/' not found"
persist-credentials: false
- id: get_xetabase_branch
name: "Get current branch for Xetabase from target branch"
Expand Down

0 comments on commit 534106c

Please sign in to comment.