Skip to content

Commit

Permalink
correct the branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
danholdaway committed Oct 23, 2024
1 parent 129438a commit 3d028eb
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/run_jcb_basic_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,19 @@ jobs:
with:
python-version: '3.x'

- name: Add repo url to the environment
run: |
JCB_APP_REPO="${{ github.repository }}"
echo "JCB_APP_REPO=${JCB_APP_REPO}" >> $GITHUB_ENV
- name: Determine the name of the client branch
- name: Determine the name of the algorithm branch
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
JCB_APP_BRANCH=${{ github.head_ref }}
JCB_ALGO_BRANCH=${{ github.head_ref }}
else
BRANCH_REF=${{ github.ref }}
JCB_APP_BRANCH=${BRANCH_REF#refs/heads/}
JCB_ALGO_BRANCH=${BRANCH_REF#refs/heads/}
fi
echo "JCB_APP_BRANCH=$JCB_APP_BRANCH" >> $GITHUB_ENV
echo "JCB_ALGO_BRANCH=$JCB_ALGO_BRANCH" >> $GITHUB_ENV
- name: Check for existence of the branch name in the main jcb repo
run: |
BRANCH_NAME=${{ env.JCB_APP_BRANCH }}
BRANCH_NAME=${{ env.JCB_ALGO_BRANCH }}
if git ls-remote --heads $JCB_REPO $BRANCH_NAME | grep -q "refs/heads/$BRANCH_NAME"; then
echo "Branch $BRANCH_NAME exists in jcb repo."
Expand Down Expand Up @@ -73,7 +68,7 @@ jobs:
run: |
mkdir -p empty_hooks
git config --global core.hooksPath empty_hooks
git clone --branch ${{ env.JCB_BRANCH }} --recursive $JCB_REPO jcb_repo
git clone --branch ${{ env.JCB_ALGO_BRANCH }} $JCB_REPO jcb_repo
- name: Clone the clients
run: |
Expand Down

0 comments on commit 3d028eb

Please sign in to comment.