From 84d120328d0dfe7b351d36bfaff3ab9995556db8 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:22:18 -0700 Subject: [PATCH 1/4] try on main 2.0 --- .github/workflows/trigger_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trigger_main.yml b/.github/workflows/trigger_main.yml index bd5e61c..c95c51f 100644 --- a/.github/workflows/trigger_main.yml +++ b/.github/workflows/trigger_main.yml @@ -42,7 +42,7 @@ jobs: 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 + #echo $cmd metplus_branch=$($cmd) echo git -C $GITHUB_WORKSPACE/METplus branch -l ${metplus_branch} git -C $GITHUB_WORKSPACE/METplus branch -l From a96e71f7c6a3f3e2ec10b219d2d19762c51ab880 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:24:26 -0700 Subject: [PATCH 2/4] test --- .github/workflows/trigger_main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trigger_main.yml b/.github/workflows/trigger_main.yml index c95c51f..1bbd519 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 + - id: 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 - uses: actions/checkout@v4 @@ -42,7 +43,7 @@ jobs: 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 + echo $cmd metplus_branch=$($cmd) echo git -C $GITHUB_WORKSPACE/METplus branch -l ${metplus_branch} git -C $GITHUB_WORKSPACE/METplus branch -l From 8930bd1d7dce01835e49673703af200fd0ffc8dd Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:25:16 -0700 Subject: [PATCH 3/4] test2 --- .github/workflows/trigger_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trigger_main.yml b/.github/workflows/trigger_main.yml index 1bbd519..48d0ccd 100644 --- a/.github/workflows/trigger_main.yml +++ b/.github/workflows/trigger_main.yml @@ -22,7 +22,7 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - - id: Checkout code from this repo + - 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 From de1015fd08924f4150cab06f5b2b04a7640694a4 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:27:26 -0700 Subject: [PATCH 4/4] test3 --- .github/workflows/trigger_main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/trigger_main.yml b/.github/workflows/trigger_main.yml index 48d0ccd..732d65a 100644 --- a/.github/workflows/trigger_main.yml +++ b/.github/workflows/trigger_main.yml @@ -45,9 +45,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"