-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathaction.yaml
56 lines (52 loc) · 1.74 KB
/
action.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
name: Update Coder Template
description: An action to deploy changes to your coder template automatically
author: "Muhammad Atif Ali <me@matifali.dev>"
branding:
icon: arrow-up-circle
color: green
inputs:
id:
description: "Template identifier (e.g. my-template)"
required: true
url:
description: "Coder access URL (e.g. https://coder.example.com)"
required: true
coder_session_token:
description: "Coder session token"
required: true
dir:
description: "Template directory name (path to the directory containing the main.tf file default: TEMPLATE_NAME)"
required: false
name:
description: "Template version name (e.g. v1.0.0, commit hash, etc.), should be unique, default: a random string"
required: false
activate:
description: "Marks the current template version as active"
required: false
default: "true"
message:
description: "update message"
required: false
default: "Updated via update-coder-template action"
dry_run:
description: "Dry run"
required: false
default: "false"
runs:
using: "composite"
steps:
- run: curl -fsSL $CODER_URL/bin/coder-linux-amd64 -o /usr/local/bin/coder && chmod +x /usr/local/bin/coder
shell: bash
env:
CODER_URL: ${{ inputs.url }}
- run: ${{ github.action_path }}/push_template.sh
shell: bash
env:
CODER_SESSION_TOKEN: ${{ inputs.coder_session_token }}
CODER_URL: ${{ inputs.url }}
CODER_TEMPLATE_ID: ${{ inputs.id }}
CODER_TEMPLATE_DIR: ${{ inputs.dir }}
CODER_TEMPLATE_VERSION_NAME: ${{ inputs.name }}
CODER_TEMPLATE_ACTIVATE: ${{ inputs.activate }}
CODER_TEMPLATE_MESSAGE: ${{ inputs.message }}
CODER_TEMPLATE_DRY_RUN: ${{ inputs.dry_run }}