File tree Expand file tree Collapse file tree 2 files changed +7
-17
lines changed
Expand file tree Collapse file tree 2 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,11 @@ jobs:
5757 TITLE="${{ github.event.pull_request.title }}"
5858 echo "PR Title: $TITLE"
5959
60- TYPES=$(echo "${{ inputs.types }}" | tr '\n' '|' | sed 's/|$//')
61-
62- # Allow capitalized types as well
63- TYPES_REGEX="${TYPES}|$(echo ${TYPES} | sed 's/\([^|]*\)/\u\1|\l\1/g')"
60+ shopt -s nocasematch
61+ TYPES=$(echo "${{ inputs.types }}" | tr ',\n' '|' | sed 's/|$//')
6462
6563 # Full regex for conventional commits
66- FULL_REGEX="^(${TYPES_REGEX })(\([a-zA-Z0-9_-]+\))?:\s+${{ inputs.subjectPattern }}$"
64+ FULL_REGEX="^(${TYPES })(\([a-zA-Z0-9_-]+\))?:\s+${{ inputs.subjectPattern }}$"
6765
6866 if [[ ! "$TITLE" =~ $FULL_REGEX ]]; then
6967 echo "::error::PR title does not follow Conventional Commit format."
8482
8583 # Enforce scope if required
8684 if [[ "${{ inputs.requireScope }}" == "true" ]]; then
87- if [[ ! "$TITLE" =~ ^(${TYPES_REGEX })\([a-zA-Z0-9_-]+\): ]]; then
85+ if [[ ! "$TITLE" =~ ^(${TYPES })\([a-zA-Z0-9_-]+\): ]]; then
8886 echo "::error::PR title must include a scope because requireScope=true"
8987 echo "Example:"
9088 echo " feat(auth): Add login API"
Original file line number Diff line number Diff line change @@ -259,23 +259,15 @@ jobs:
259259
260260 - name : 🧹 Terraform Format
261261 uses : ' dflook/terraform-fmt-check@v2'
262- with :
263- actions_subcommand : ' fmt'
264262
265263 - name : 🏗️ Terraform Init
266- uses : hashicorp/terraform-github-actions@master
267- with :
268- tf_actions_subcommand : " init"
269- tf_actions_version : 1.3.6
270- tf_actions_working_dir : ${{ inputs.working_directory }}
271- env :
272- GITHUB_TOKEN : ' ${{ secrets.GITHUB }}'
273- TF_CLI_ARGS : " -backend-config=token=${{ secrets.TF_API_TOKEN }}"
264+ id : init
265+ run : terraform init -input=false
274266
275267 - name : 🔎 Terraform validate
276268 uses : dflook/terraform-validate@v2
277269 with :
278- tf_actions_working_dir : ${{ inputs.working_directory }}
270+ path : ${{ inputs.working_directory }}
279271
280272 - name : 📋 Terraform Plan
281273 if : ${{ inputs.enable_plan }}
You can’t perform that action at this time.
0 commit comments