-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
44 lines (44 loc) · 1.22 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: 'Setup tbls'
description: 'GitHub Action for tbls, a CI-Friendly tool for document a database, written in Go.'
branding:
icon: 'box'
color: 'blue'
inputs:
github-token:
description: The GitHub token
default: ${{ github.token }}
required: false
version:
description: Version of tbls
default: latest
required: false
force:
description: Enable force setup
default: ''
required: false
runs:
using: 'composite'
steps:
-
id: set-path
shell: bash
run: echo "path=$HOME/.tbls/bin" >> $GITHUB_OUTPUT
-
shell: bash
run: |
mkdir -p ${{ steps.set-path.outputs.path }}
if [[ "$RUNNER_OS" == "Linux" || "$RUNNER_OS" == "macOS" ]]; then
echo "${{ steps.set-path.outputs.path }}" >> $GITHUB_PATH
elif [[ "$RUNNER_OS" == "Windows" ]]; then
echo $(cygpath -w "${{ steps.set-path.outputs.path }}") >> $GITHUB_PATH
fi
-
uses: k1LoW/gh-setup@v1
with:
repo: github.com/k1LoW/tbls
github-token: ${{ inputs.github-token }}
version: ${{ inputs.version }}
bin-match: tbls
strict: true
force: ${{ inputs.force }}
bin-dir: ${{ steps.set-path.outputs.path }}