Skip to content

Two new optional inputs, provisioner_tag and ignore_lockfile, to enhance the configurability of the template push process #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

brunocarvalhodearaujo
Copy link

This pull request introduces two new optional inputs, provisioner_tag and ignore_lockfile, to enhance the configurability of the template push process. These inputs are integrated into the action's environment variables and the push_template.sh script to support additional functionality.

Enhancements to action.yaml inputs:

  • Added the provisioner_tag input to allow specifying a provisioner tag for identifying the template version in the Coder UI. Default value is "-".
  • Added the ignore_lockfile input to enable ignoring warnings about the absence of a .terraform.lock.hcl file. Default value is "false".

Updates to the push_template.sh script:

  • Incorporated the provisioner_tag input into the push command to include a --provisioner-tag option if specified.
  • Integrated the ignore_lockfile input into the push command to add a --ignore-lockfile=true flag when enabled.

@Copilot Copilot AI review requested due to automatic review settings July 19, 2025 21:54
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the Coder template push action by adding two new optional configuration inputs: provisioner_tag for template version identification in the UI and ignore_lockfile for handling missing Terraform lock files.

  • Added provisioner_tag input with default value "-" to tag template versions
  • Added ignore_lockfile input with default value "false" to suppress lockfile warnings
  • Updated shell script to conditionally include the new flags in the push command

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
action.yaml Added two new input definitions and corresponding environment variables
push_template.sh Implemented conditional logic to include new command-line flags based on environment variables

provisioner_tag:
description: "Add provisioner tag to the template, useful for identifying the template version in the Coder UI"
required: false
default: "-"
Copy link
Preview

Copilot AI Jul 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value "-" for provisioner_tag is unclear and may cause confusion. Consider using an empty string or a more descriptive default value, or make it truly optional without a default.

Suggested change
default: "-"
default: ""

Copilot uses AI. Check for mistakes.

@@ -19,6 +19,11 @@ if [ -n "${CODER_TEMPLATE_MESSAGE}" ]; then
push_command+=" --message \"${CODER_TEMPLATE_MESSAGE}\""
fi

# Add provisioner tag to the push command if specified
if [ -n "${CODER_PROVISIONER_TAG}" ]; then
Copy link
Preview

Copilot AI Jul 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provisioner tag value is always passed when the environment variable is set, even if it's the default "-" value. Consider checking if the value is meaningful (not "-") before adding it to the command.

Suggested change
if [ -n "${CODER_PROVISIONER_TAG}" ]; then
if [ -n "${CODER_PROVISIONER_TAG}" ] && [ "${CODER_PROVISIONER_TAG}" != "-" ]; then

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant