Skip to content

Commit

Permalink
chore(shellcheck): fix shell scripts using shellcheck (#1921)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke authored Oct 17, 2024
1 parent 5e26e2d commit 2cce1cd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
12 changes: 12 additions & 0 deletions cmdx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ tasks:
- name: pinact
description: Run pinact
usage: Run pinact
shell:
- bash
- -c
script: |
set -euo pipefail
pinact run
find . -name action.yaml | xargs pinact run
- name: shellcheck
shell:
- bash
- -c
script: |
set -euo pipefail
git ls-files | grep -E "\.sh$" | xargs shellcheck
3 changes: 2 additions & 1 deletion create-follow-up-pr/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ set -euo pipefail
# 1. create a remote branch
# 2. open pull request

export FOLLOW_UP_BRANCH="follow-up-$CI_INFO_PR_NUMBER-$TFACTION_TARGET-$(date +%Y%m%dT%H%M%S)"
FOLLOW_UP_BRANCH="follow-up-$CI_INFO_PR_NUMBER-$TFACTION_TARGET-$(date +%Y%m%dT%H%M%S)"
export FOLLOW_UP_BRANCH

bash "$GITHUB_ACTION_PATH/create_commit.sh"

Expand Down
3 changes: 2 additions & 1 deletion create-follow-up-pr/skip_create_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -euo pipefail
# create a branch with empty commit
# 1. create a remote branch

export FOLLOW_UP_BRANCH="follow-up-$CI_INFO_PR_NUMBER-$TFACTION_TARGET-$(date +%Y%m%dT%H%M%S)"
FOLLOW_UP_BRANCH="follow-up-$CI_INFO_PR_NUMBER-$TFACTION_TARGET-$(date +%Y%m%dT%H%M%S)"
export FOLLOW_UP_BRANCH
bash "$GITHUB_ACTION_PATH/create_commit.sh"

pr_title="chore($TFACTION_TARGET): follow up #$CI_INFO_PR_NUMBER"
Expand Down
1 change: 1 addition & 0 deletions terraform-docs/terraform-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ if [ -n "$config" ]; then
opts="-c $config"
fi

# shellcheck disable=SC2086
if ! github-comment exec \
-config "${GITHUB_ACTION_PATH}/github-comment.yaml" \
-var "tfaction_target:${TFACTION_TARGET}" \
Expand Down

0 comments on commit 2cce1cd

Please sign in to comment.