diff --git a/.github/workflows/trigger_main.yml b/.github/workflows/trigger_main.yml index 2d32cae..6f4356e 100644 --- a/.github/workflows/trigger_main.yml +++ b/.github/workflows/trigger_main.yml @@ -22,7 +22,8 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - - uses: actions/checkout@v4 + - name: Checkout code from this repo + uses: actions/checkout@v4 # get the develop branch of METplus to get the latest component version script # use fetch-depth 0 to get all branches - name: Get METplus repo for component version script @@ -45,9 +46,11 @@ jobs: cmd="$GITHUB_WORKSPACE/METplus/metplus/component_versions.py -i METplotpy -v ${version} -o METplus -f main_v{X}.{Y}" echo $cmd metplus_branch=$($cmd) + # TODO: if no branch can be determined, exit and error 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 ${metplus_branch}) + branch_exists=$(git -C $GITHUB_WORKSPACE/METplus branch -l main_v5.0) echo branch exists: ${branch_exists} if [ -z "${branch_exists}" ]; then echo "METplus branch ${metplus_branch} does not exist yet"