-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Flank GitHub action (#1660)
- Loading branch information
1 parent
f5c8b1c
commit 8ee557b
Showing
11 changed files
with
293 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'Flank' | ||
description: 'Run Flank from Github actions!' | ||
inputs: | ||
version: | ||
description: 'Flank version to run' | ||
required: false | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download flankScripts | ||
run: | | ||
curl -L https://github.com/Flank/flank/releases/download/flank-scripts-1.8.0/flank-scripts.jar --output flank-scripts.jar | ||
echo 'java -jar ./flank-scripts.jar "$@"' > flankScripts | ||
chmod +x flankScripts | ||
shell: bash | ||
- id: download_flank | ||
run: | | ||
./flankScripts github download_flank --version=${{ inputs.version }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
flank-scripts/src/main/kotlin/flank/scripts/cli/github/DownloadFlankCommand.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package flank.scripts.cli.github | ||
|
||
import com.github.ajalt.clikt.core.CliktCommand | ||
import com.github.ajalt.clikt.parameters.options.option | ||
import flank.scripts.ops.github.downloadFlank | ||
import kotlinx.coroutines.runBlocking | ||
|
||
object DownloadFlankCommand : CliktCommand( | ||
name = "download_flank", | ||
help = "Downloads flank.jar with selected version." | ||
|
||
) { | ||
|
||
private val version by option( | ||
"--version", "-v", | ||
help = "If the version not set, the latest version will be used." | ||
) | ||
|
||
override fun run() = runBlocking { | ||
downloadFlank(version) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.