Skip to content

Commit

Permalink
added logic to manually trigger a workflow via the GitHub… (develop) (#…
Browse files Browse the repository at this point in the history
…2109)

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
  • Loading branch information
georgemccabe and JohnHalleyGotway committed Mar 28, 2022
1 parent 6caff89 commit c0e1944
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/jobs/set_job_controls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ elif [ "${GITHUB_EVENT_NAME}" == "push" ]; then
fi

fi


elif [ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]; then

if [ "${force_tests}" == "true" ]; then
run_diff=true
fi

fi

# if updating truth or running diff, run unit tests
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ on:
paths-ignore:
- 'met/docs/**'

workflow_dispatch:
inputs:
force_tests:
description: 'Run the unit tests'
default: true
type: boolean

env:
DOCKERHUB_REPO: dtcenter/met-dev

Expand All @@ -39,6 +46,7 @@ jobs:
run: .github/jobs/set_job_controls.sh
env:
commit_msg: ${{ github.event.head_commit.message }}
force_tests: ${{ github.event.inputs.force_tests }}

outputs:
run_compile: ${{ steps.job_status.outputs.run_compile }}
Expand Down

0 comments on commit c0e1944

Please sign in to comment.