Skip to content

Commit

Permalink
just get develop branch but query branches on remote
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe committed Nov 14, 2024
1 parent 16acd76 commit 52a9b71
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/trigger_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ jobs:
uses: actions/checkout@v4
with:
repository: 'dtcenter/METplus'
#ref: 'develop'
ref: 'develop'
path: 'METplus'
fetch-depth: 0
- id: get_version
run: |
version=$(cut -d "/" -f3 <<< "${GITHUB_REF}")
Expand All @@ -42,7 +41,6 @@ jobs:
repo=${{ github.repository }}
repo=${repo#*/}
version=${{ steps.get_version.outputs.version }}
git -C $GITHUB_WORKSPACE/METplus checkout develop
cmd="$GITHUB_WORKSPACE/METplus/metplus/component_versions.py -i METplotpy -v ${version} -o METplus -f main_v{X}.{Y}"
echo $cmd
metplus_branch=$($cmd)
Expand All @@ -53,8 +51,8 @@ jobs:
fi
echo git -C $GITHUB_WORKSPACE/METplus branch -l ${metplus_branch}
git -C $GITHUB_WORKSPACE/METplus branch -l
#branch_exists=$(git -C $GITHUB_WORKSPACE/METplus branch -l ${metplus_branch})
branch_exists=$(git -C $GITHUB_WORKSPACE/METplus branch -l main_v5.0)
#branch_exists=$(git -C $GITHUB_WORKSPACE/METplus ls-remote origin ${metplus_branch})
branch_exists=$(git -C $GITHUB_WORKSPACE/METplus ls-remote origin main_v5.0)
echo branch exists: ${branch_exists}
if [ -z "${branch_exists}" ]; then
echo "METplus branch ${metplus_branch} does not exist yet"
Expand Down

0 comments on commit 52a9b71

Please sign in to comment.