more config

This commit is contained in:
ok-nick 2022-07-17 22:56:05 -04:00
parent 88015e5b4d
commit 12c9e1b424

View file

@ -1,15 +1,26 @@
name: 'setup-aftman' name: 'setup-aftman'
description: 'Github action to install aftman' description: 'Github action to install aftman'
author: 'ok-nick'
inputs: inputs:
version: version:
description: '`aftman` version in the form `vx.x.x`' description: '`aftman` version in the form `vx.x.x`'
required: false required: false
no-trust-check:
description: "Whether to check trusts"
default: 'false'
required: false
trusts:
description: 'List of trusted tools separated by spaces'
required: false
path:
description: 'Path to the `aftman.toml` directory'
default: ''
required: false
token: token:
description: 'Github token from `secrets.GITHUB_TOKEN`' description: 'Github token from `secrets.GITHUB_TOKEN`'
required: true required: true
runs: runs:
using: 'composite' using: 'composite'
steps: steps:
@ -33,7 +44,24 @@ runs:
env: env:
GITHUB_TOKEN: ${{ inputs.token }} GITHUB_TOKEN: ${{ inputs.token }}
- name: Setup trusts
if: ${{ inputs.no-trust-check == 'false' }}
run: |
for name in ${{ inputs.trusts }}; do
aftman trust $name
done
shell: bash
- name: Install tools
run: |
cd ${{ inputs.path }}
if [ ${{ inputs.no-trust-check }} == 'true' ]; do
aftman install --no-trust-check
else
aftman install
fi
shell: bash
branding: branding:
icon: link-2 icon: link-2
color: blue color: blue