From 6c8f49b56dc8e9052728f51ba0493f055290ef58 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:18:26 -0700 Subject: [PATCH] add quotes around value sent to trigger METplus workflow and remove unnecessary step --- .github/workflows/build_docker_and_trigger_metplus.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_docker_and_trigger_metplus.yml b/.github/workflows/build_docker_and_trigger_metplus.yml index 7db9f2705..ccd7b570c 100644 --- a/.github/workflows/build_docker_and_trigger_metplus.yml +++ b/.github/workflows/build_docker_and_trigger_metplus.yml @@ -80,16 +80,16 @@ jobs: echo "ERROR: Could not get METplus branch" exit 1 fi + + # if branch doesn't exist in remote, do not trigger METplus workflow branch_exists=$(git -C $GITHUB_WORKSPACE/METplus ls-remote origin ${metplus_branch}) if [ -z "${branch_exists}" ]; then echo "METplus branch ${metplus_branch} does not exist yet" metplus_branch=none fi + echo "metplus_branch=${metplus_branch}" >> $GITHUB_OUTPUT - - if: ( steps.get_metplus_branch.outputs.metplus_branch != 'none' ) - run: | - metplus_branch=${{ steps.get_metplus_branch.outputs.metplus_branch }} - echo "Triggering workflow dispatch of ${metplus_branch}" + - if: ( steps.get_metplus_branch.outputs.metplus_branch != 'none' ) uses: actions/github-script@v7 with: @@ -99,7 +99,7 @@ jobs: owner: 'dtcenter', repo: 'METplus', workflow_id: 'testing.yml', - ref: ${{ steps.get_metplus_branch.outputs.metplus_branch }}, + ref: '${{ steps.get_metplus_branch.outputs.metplus_branch }}', inputs: { repository: '${{ github.repository }}', ref: '${{ github.ref }}',