From 12c9e1b42422d1de0dccaeaf9500c30c59161f13 Mon Sep 17 00:00:00 2001 From: ok-nick <25470747+ok-nick@users.noreply.github.com> Date: Sun, 17 Jul 2022 22:56:05 -0400 Subject: [PATCH] more config --- action.yml | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 1ea83b6..5982ea4 100644 --- a/action.yml +++ b/action.yml @@ -1,21 +1,32 @@ name: 'setup-aftman' description: 'Github action to install aftman' +author: 'ok-nick' inputs: version: description: '`aftman` version in the form `vx.x.x`' 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: description: 'Github token from `secrets.GITHUB_TOKEN`' required: true - runs: using: 'composite' steps: - name: Download aftman if: runner.os == 'Linux' - run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *linux-x86_64.zip + run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *linux-x86_64.zip - name: Download aftman if: runner.os == 'Windows' @@ -33,7 +44,24 @@ runs: env: 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: icon: link-2 color: blue -