Skip to content

Commit

Permalink
split branches into array
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspie committed Jul 26, 2024
1 parent dc70f9d commit c36e176
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/plugin_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ jobs:
- name: Check if branch exists
id: check-branch
run: |
branch_exists=false
branches=(${{ matrix.branches }})
for branch in ${branches[@]}; do
# Split the branches into an array
IFS=',' read -ra branches <<< "${{ matrix.branches }}"
# Check each branch for existence
for branch in "${branches[@]}"; do
echo "Checking branch: $branch"
if git ls-remote --heads https://github.com/FAIRmat-NFDI/${{ matrix.plugin }}.git $branch | grep -q "refs/heads/$branch"; then
echo "Branch $branch exists."
Expand Down

0 comments on commit c36e176

Please sign in to comment.