Working dir input.
This commit is contained in:
+9
-7
@@ -2,7 +2,6 @@ name: "Terraform/OpenTofu PR Commenter"
|
||||
description: "Posts Terraform/OpenTofu `fmt`, `init`, `plan`, or `validate` results as PR comments on GitHub or Gitea."
|
||||
author: "Charish Patel"
|
||||
|
||||
# Define the inputs
|
||||
inputs:
|
||||
command:
|
||||
description: "The command type: fmt | init | plan | validate"
|
||||
@@ -46,9 +45,11 @@ inputs:
|
||||
description: "Terraform/OpenTofu workspace (default: 'default')"
|
||||
required: false
|
||||
default: default
|
||||
working_directory:
|
||||
description: "Optional working directory relative to repo root; if set, script runs there"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
|
||||
# Define the action type
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -56,9 +57,12 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
chmod +x ${{ github.action_path }}/tf-pr-comment.sh
|
||||
${{ github.action_path }}/tf-pr-comment.sh "${{ inputs.command }}" "${{ inputs.commenter_input }}" "${{ inputs.commenter_exitcode }}"
|
||||
${{ github.action_path }}/tf-pr-comment.sh \
|
||||
"${{ inputs.command }}" \
|
||||
"${{ inputs.commenter_input }}" \
|
||||
"${{ inputs.commenter_exitcode }}" \
|
||||
"${{ inputs.working_directory }}"
|
||||
env:
|
||||
# PR Environment Variables
|
||||
PR_NUMBER: ${{ inputs.pr_number }}
|
||||
PR_COMMENTS_URL: ${{ inputs.pr_comments_url }}
|
||||
PR_COMMENT_URI: ${{ inputs.pr_comment_uri }}
|
||||
@@ -67,7 +71,5 @@ runs:
|
||||
GITEA_ACTION: ${{ inputs.gitea_action }}
|
||||
GITEA_API_URL: ${{ inputs.gitea_api_url }}
|
||||
GITEA_REPOSITORY: ${{ inputs.gitea_repository }}
|
||||
# Optional highlighting
|
||||
HIGHLIGHT_CHANGES: ${{ inputs.highlight_changes }}
|
||||
TF_WORKSPACE: ${{ inputs.tf_workspace }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user