Skip to content

Commit

Permalink
Updated to add configurable target
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Jan 9, 2024
1 parent b87a602 commit 5b191eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ jobs:
uses: uniget-org/uniget-action@v1
with:
prefix: helper
target: ""
tools: gojq yq

- name: Check installed tools
run: |
uniget --prefix=helper install --installed --plan
uniget --prefix=helper --target=usr/local install --installed --plan
- name: Test tools
run: |
Expand Down
10 changes: 7 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
description: 'Directory prefix for tool installation'
required: false
default: ''
target:
description: 'Subdirectory relative to prefix for tool installation'
required: false
default: 'usr/local'
skip-conflicts:
description: 'Skip conflicting tools'
required: false
Expand Down Expand Up @@ -69,7 +73,7 @@ runs:
exit 0
fi
echo "Updating metadata"
${{ inputs.path }}/uniget --log-level=${{ inputs.log-level }} --prefix=${{ inputs.prefix }} update
${{ inputs.path }}/uniget --log-level=${{ inputs.log-level }} --prefix=${{ inputs.prefix }} --target=${{ inputs.target }} update
- name: Plan installation
shell: bash
Expand All @@ -83,7 +87,7 @@ runs:
exit 0
fi
echo "Installing tools (${{ inputs.tools }})"
${{ inputs.path }}/uniget --log-level=${{ inputs.log-level }} --prefix=${{ inputs.prefix }} install --skip-conflicts=${{ inputs.skip-conflicts }} ${{ inputs.tools }} --plan
${{ inputs.path }}/uniget --log-level=${{ inputs.log-level }} --prefix=${{ inputs.prefix }} --target=${{ inputs.target }} install --skip-conflicts=${{ inputs.skip-conflicts }} ${{ inputs.tools }} --plan
- name: Install tools
shell: bash
Expand All @@ -93,4 +97,4 @@ runs:
exit 0
fi
echo "Installing tools (${{ inputs.tools }})"
${{ inputs.path }}/uniget --log-level=${{ inputs.log-level }} --prefix=${{ inputs.prefix }} install --skip-conflicts=${{ inputs.skip-conflicts }} ${{ inputs.tools }}
${{ inputs.path }}/uniget --log-level=${{ inputs.log-level }} --prefix=${{ inputs.prefix }} --target=${{ inputs.target }} install --skip-conflicts=${{ inputs.skip-conflicts }} ${{ inputs.tools }}

0 comments on commit 5b191eb

Please sign in to comment.