Skip to content

Commit

Permalink
check via git if remote exists
Browse files Browse the repository at this point in the history
  • Loading branch information
greole committed Dec 20, 2024
1 parent c173a2e commit 4d84260
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build_adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,20 @@ jobs:
CXX: g++
runs-on: ubuntu-24.04
steps:
- name: Select branch to checkout
run: |
if [[ $(git ls-remote --heads https://github.com/exasim-project/FoamAdapter ${{ github.head_ref }}) ]]
then
echo checkout=${{ env.branch }} >> $GITHUB_ENV
else
echo checkout=main >> $GITHUB_ENV
fi
- name: Checkout FoamAdapter
uses: actions/checkout@v4
with:
repository: exasim-project/FoamAdapter
ref: '${{ github.head_ref }}'
ref: '${{ env.branch }}'

- name: Checkout NeoFOAM submodule
uses: actions/checkout@v4
Expand Down

0 comments on commit 4d84260

Please sign in to comment.