Merge pull request #9 from matifali/v3

This commit is contained in:
Muhammad Atif Ali 2024-01-11 21:18:54 +03:00 committed by GitHub
commit 0c62247cae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 12 deletions

View file

@ -23,7 +23,6 @@ Update coder templates automatically
| **`dir`** | **Required** The directory of the template that contains `main.tf` file | - |
| `name` | New version name for the template. | Autogenerated name by Coder |
| `activate` | Activate the new template version. | `true` |
| `create` | Creates a new template if it does not exist | `true` |
| `message` | Update message (similar to commit messages) | - |
| `dry_run` | Dry run mode. | `false` |

View file

@ -1,6 +1,6 @@
name: Update Coder Template
description: An action to deploy changes to your coder template automatically
author: "Muhammad Atif Ali <matifali@live.com>"
author: "Muhammad Atif Ali <me@matifali.dev>"
branding:
icon: arrow-up-circle
@ -30,10 +30,6 @@ inputs:
description: "update message"
required: false
default: "Updated via update-coder-template action"
create:
description: "Creates a new template if it does not exist"
required: false
default: "true"
dry_run:
description: "Dry run"
required: false
@ -57,5 +53,4 @@ runs:
CODER_TEMPLATE_VERSION_NAME: ${{ inputs.name }}
CODER_TEMPLATE_ACTIVATE: ${{ inputs.activate }}
CODER_TEMPLATE_MESSAGE: ${{ inputs.message }}
CODER_TEMPLATE_CREATE: ${{ inputs.create }}
CODER_TEMPLATE_DRY_RUN: ${{ inputs.dry_run }}

View file

@ -19,11 +19,6 @@ if [ -n "${CODER_TEMPLATE_MESSAGE}" ]; then
push_command+=" --message \"${CODER_TEMPLATE_MESSAGE}\""
fi
# Append --create flag to the push command if CODER_TEMPLATE_CREATE is true
if [ "${CODER_TEMPLATE_CREATE}" = "true" ]; then
push_command+=" --create"
fi
# Add version to the push command if specified
if [ -n "${CODER_TEMPLATE_VERSION_NAME}" ]; then
push_command+=" --name ${CODER_TEMPLATE_VERSION_NAME}"