setup-rokit/action.yml

77 lines
1.9 KiB
YAML
Raw Normal View History

2022-07-17 23:41:58 -04:00
name: setup-aftman
description: Github action to install aftman
author: ok-nick
2022-07-17 21:32:18 -04:00
inputs:
version:
description: '`aftman` version in the form `vx.x.x`'
required: false
2022-07-17 22:56:05 -04:00
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'
2022-07-18 12:07:51 -04:00
default: '.'
2022-07-17 22:56:05 -04:00
required: false
2022-07-17 21:32:18 -04:00
token:
2022-07-18 11:49:36 -04:00
description: 'Github token from `github.token`'
2022-07-18 11:50:58 -04:00
default: '${{ github.token }}'
2022-07-18 12:07:51 -04:00
required: false
2022-07-17 21:32:18 -04:00
runs:
using: 'composite'
steps:
- name: Download aftman
if: runner.os == 'Linux'
2022-07-17 22:56:05 -04:00
run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *linux-x86_64.zip
2022-07-18 12:20:56 -04:00
shell: bash
2022-07-17 23:55:01 -04:00
env:
GITHUB_TOKEN: ${{ inputs.token }}
2022-07-17 21:32:18 -04:00
- name: Download aftman
if: runner.os == 'macOS'
run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *macos-x86_64.zip
2022-07-18 12:20:56 -04:00
shell: bash
2022-07-17 23:55:01 -04:00
env:
GITHUB_TOKEN: ${{ inputs.token }}
2022-07-17 21:32:18 -04:00
2022-07-17 23:41:58 -04:00
- name: Download aftman
if: runner.os == 'Windows'
run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *windows-x86_64.zip
2022-07-18 12:20:56 -04:00
shell: bash
2022-07-17 23:55:01 -04:00
env:
GITHUB_TOKEN: ${{ inputs.token }}
2022-07-17 23:41:58 -04:00
2022-07-17 21:32:18 -04:00
- name: Install aftman
run: |
unzip aftman*.zip
./aftman self-install
echo "$HOME/.aftman/bin" >> $GITHUB_PATH
2022-07-18 12:20:56 -04:00
shell: bash
2022-07-17 21:32:18 -04:00
2022-07-17 22:56:05 -04:00
- name: Setup trusts
2022-07-18 12:47:47 -04:00
if: inputs.no-trust-check == 'false'
2022-07-17 22:56:05 -04:00
run: |
for name in ${{ inputs.trusts }}; do
aftman trust $name
done
2022-07-18 12:20:56 -04:00
shell: bash
2022-07-17 22:56:05 -04:00
- name: Install tools
run: |
cd ${{ inputs.path }}
2022-07-17 23:59:47 -04:00
if [ ${{ inputs.no-trust-check }} == true ]; then
2022-07-17 22:56:05 -04:00
aftman install --no-trust-check
else
aftman install
fi
2022-07-18 12:20:56 -04:00
shell: bash
2022-07-17 22:56:05 -04:00
2022-07-17 21:32:18 -04:00
branding:
icon: link-2
color: blue