mirror of
https://github.com/CompeyDev/setup-rokit.git
synced 2024-12-12 04:30:37 +00:00
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: setup-rokit
|
|
description: GitHub action to install and run rokit; a toolchain manager.
|
|
author: ok-nick
|
|
|
|
inputs:
|
|
version:
|
|
description: "`rokit` git tag (usually in the form vx.x.x)"
|
|
required: false
|
|
path:
|
|
description: "Path to the directory with the toolchain manifest"
|
|
default: "."
|
|
required: false
|
|
cache:
|
|
description: "Whether to enable caching"
|
|
default: "false"
|
|
required: false
|
|
token:
|
|
description: "GitHub token via `github.token`"
|
|
default: "${{ github.token }}"
|
|
required: false
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Install rokit
|
|
run: curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/rojo-rbx/rokit/main/scripts/install.sh | sh
|
|
env:
|
|
GITHUB_TOKEN: ${{ inputs.token }}
|
|
shell: bash
|
|
|
|
- name: Create auth file
|
|
run: |
|
|
cat > $HOME/.rokit/auth.toml << EOF
|
|
github = "${{ inputs.token }}"
|
|
EOF
|
|
shell: bash
|
|
|
|
- name: Cache binaries
|
|
if: ${{ inputs.cache == true || inputs.cache == 'true' }}
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.rokit/bin
|
|
~/.rokit/tool-storage
|
|
key: ${{ runner.os }}-rokit-${{hashFiles(format('{0}/{aftman,foreman,rokit}.toml', inputs.path))}}
|
|
|
|
- name: Install tools
|
|
run: |
|
|
cd ${{ inputs.path }}
|
|
rokit install --no-trust-check
|
|
shell: bash
|
|
|
|
branding:
|
|
icon: download
|
|
color: red
|