Skip to content

Commit

Permalink
Merge pull request GetTerminus#21 from GetTerminus/dpr-fix-default-ve…
Browse files Browse the repository at this point in the history
…rsion

fix: default version and author
  • Loading branch information
dreinhardt89 authored Jun 26, 2023
2 parents b15399d + 66eca3a commit 7f94331
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'Terraform and TFLint PR Commenter'
description: 'Adds opinionated comments to a PR from Terraform fmt/init/plan/validate/tflint output'
author: 'Rob Burger'
author: 'GetTerminus'
branding:
icon: 'git-pull-request'
color: 'blue'
Expand All @@ -20,22 +20,32 @@ inputs:
terraform_version:
description: 'The version of terraform from the workflow.'
required: false
default: "1.4.6"
default: '1.4.6'
use_beta_version:
description: 'Whether to use the beta version of the commenter'
required: false
default: 'false'
runs:
using: "composite"
steps:
- name: Set Terraform Version if inputs.terraform_version is Empty # Until https://github.com/actions/runner/issues/924 is fixed
id: tf_version
run: |
if [[ -z ${{ inputs.terraform_version }} ]]; then
echo "version=1.4.6" >> $GITHUB_OUTPUT
else
echo "version=${{ inputs.terraform_version }}" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Build commenter docker image (master)
if: ${{ inputs.use_beta_version != 'true' }}
run: docker build --build-arg TERRAFORM_VERSION=${{ inputs.terraform_version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#v3
run: docker build --build-arg TERRAFORM_VERSION=${{ steps.tf_version.outputs.version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#v3
shell: bash
- name: Build commenter docker image (beta)
if: ${{ inputs.use_beta_version == 'true' }}
# append branch with a pound (#) if developing. e.g., `commenter.git#my-branch`
run: docker build --build-arg TERRAFORM_VERSION=${{ inputs.terraform_version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#v3-beta
run: |
docker build --build-arg TERRAFORM_VERSION=${{ steps.tf_version.outputs.version }} -t commenter https://github.com/GetTerminus/terraform-pr-commenter.git#v3-beta
shell: bash
- name: Run commenter image (plan)
if: ${{ inputs.commenter_type == 'plan' }}
Expand Down

0 comments on commit 7f94331

Please sign in to comment.