Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@comdotlinux
Created November 26, 2022 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save comdotlinux/a40e6206b7ffec6c4f91c03e7d387e00 to your computer and use it in GitHub Desktop.
Save comdotlinux/a40e6206b7ffec6c4f91c03e7d387e00 to your computer and use it in GitHub Desktop.
Simple External Command Execution Using Gradle
tasks.register("runBuild") {
group = "com.linux"
description = "Trigger Build Execution On Github Actions"
doLast {
val command = """gh workflow run build.yaml --ref master --field version=0.0.1"""
exec {
logger.lifecycle("Running Command $command")
commandLine = command.split(" ")
logger.lifecycle("Command executed.")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment