-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved get-tested setup to own workflow
This way it can be reused if one does need it in other places and not only for build matrix generation.
- Loading branch information
Showing
2 changed files
with
52 additions
and
15 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
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,45 @@ | ||
name: "Set up get-tested" | ||
description: "Fetches the get-tested tool" | ||
|
||
inputs: | ||
version: | ||
description: "The version of the get-tested tool. Defaults to 'latest' if unspecified." | ||
required: false | ||
default: "" | ||
directory: | ||
description: "The directory where the get-tested executable should be placed." | ||
required: false | ||
default: "." | ||
|
||
outputs: | ||
path: | ||
description: "The path to the get-tested executable." | ||
value: ${{ steps.setup.outputs.path }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up get-tested | ||
id: setup | ||
shell: bash | ||
run: | | ||
gh_release_flags=( | ||
--repo Kleidukos/get-tested | ||
--pattern 'get-tested-*-Linux-static-x86_64.tar.gz' | ||
--output get-tested.tar.gz | ||
) | ||
if [[ "${{ inputs.version }}" != "" ]]; then | ||
gh release download "v${{ inputs.version }}" "${gh_release_flags[@]}" | ||
else | ||
gh release download "${gh_release_flags[@]}" | ||
fi | ||
tar -x -v -z -f get-tested.tar.gz -C "${{ inputs.directory }}" | ||
path="${{ inputs.directory }}/get-tested" | ||
chmod a+x "${path}" | ||
echo "path=${path}" >> "${GITHUB_OUTPUT}" | ||
branding: | ||
icon: 'list' | ||
color: 'blue' |