Skip to content

Commit 72611f6

Browse files
author
Guy Davenport
committed
check if different brapi release
1 parent af3d9bb commit 72611f6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/generate.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,23 @@ jobs:
3636
ssh-key: ${{ secrets.DEPLOY_KEY }}
3737
path: main
3838

39+
- name: Set BrAPI branch
40+
id: set-brapi-branch
41+
run: |
42+
if [[ "${GITHUB_REF##*/}" == "main" ]]; then
43+
echo "BRAPI_BRANCH=" >> "$GITHUB_ENV"
44+
elif [[ "${GITHUB_REF##*/}" == brapi-V* ]]; then
45+
echo "BRAPI_BRANCH=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
46+
else
47+
echo "BRAPI_BRANCH=" >> "$GITHUB_ENV"
48+
fi
49+
3950
- name: Checkout BrAPI repo to temp directory
4051
uses: actions/checkout@v4
4152
with:
4253
repository: plantbreeding/BrAPI
4354
path: BrAPI
55+
ref: ${{ env.BRAPI_BRANCH }}
4456

4557
- name: Set up JDK 21
4658
uses: actions/setup-java@v4

0 commit comments

Comments
 (0)