diff --git a/action.yaml b/action.yaml index e91cc391..e5fe0ddd 100644 --- a/action.yaml +++ b/action.yaml @@ -210,7 +210,7 @@ runs: - name: Locate trunk shell: bash - run: ${GITHUB_ACTION_PATH}/locate_trunk.sh + run: ${GITHUB_ACTION_PATH}/setup/locate_trunk.sh - name: Determine check mode shell: bash diff --git a/setup/action.yaml b/setup/action.yaml new file mode 100644 index 00000000..b9aa1b69 --- /dev/null +++ b/setup/action.yaml @@ -0,0 +1,24 @@ +name: Trunk Check +author: trunk.io +description: The official trunk.io GitHub action to install trunk + +inputs: + trunk-path: + description: + Path to Trunk Launcher. If not provided, we'll look for it the repo root, `.trunk/bin` and + `tools/`. If it can't be found anywhere and is not provided explicitly, we'll download it on + demand. + required: false + +branding: + icon: check + color: green + +runs: + using: composite + steps: + - name: Locate trunk + shell: bash + run: ${GITHUB_ACTION_PATH}/locate_trunk.sh + env: + INPUT_TRUNK_PATH: ${{ inputs.trunk-path }} diff --git a/locate_trunk.sh b/setup/locate_trunk.sh similarity index 100% rename from locate_trunk.sh rename to setup/locate_trunk.sh