-
Notifications
You must be signed in to change notification settings - Fork 12
/
action.yml
32 lines (29 loc) · 1.13 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
name: "tempio"
description: "A template helper for docker images which using text/template golang engine."
runs:
using: "composite"
steps:
- shell: bash
id: version
run: |
input=$(echo "${{ github.action_path }}" | cut -d"/" -f8 )
if [[ "${input}" == "main" ]] || [[ -z "${input}" ]]; then
input="latest"
fi
echo "::set-output name=version::${input}"
- shell: bash
run: |
mkdir -p "${{ github.action_path }}/bin"
if [[ "${{ steps.version.outputs.version }}" == "latest" ]]; then
url="https://github.com/home-assistant/tempio/releases/latest/download/tempio_amd64"
else
url="https://github.com/home-assistant/tempio/releases/download/${{ steps.version.outputs.version }}/tempio_amd64"
fi
echo "Downloading ${{ steps.version.outputs.version }} version of tempio"
curl -Lo "${{ github.action_path }}/bin/tempio" "$url"
chmod +x "${{ github.action_path }}/bin/tempio"
echo "Adding tempio to PATH"
echo "${{ github.action_path }}/bin" >> "$GITHUB_PATH"
branding:
icon: 'terminal'
color: 'black'