Skip to content

Commit

Permalink
Make some fix in formatting bash files
Browse files Browse the repository at this point in the history
Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com>
  • Loading branch information
hansinikarunarathne committed Jul 20, 2024
1 parent 2382e5a commit ecf78aa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/bash_formatter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,17 @@ jobs:
run: cat changed_files_in_PR.txt || echo "No bash files have changed in this PR."

- name: Run ShellCheck on changed files
if: steps.changed_files.outputs.changed_files != ''
id: lint
run: |
cat changed_files_in_PR.txt | xargs -I {} shellcheck {} || echo "No changes needed for the bash files."
if grep -q 'No bash files have changed in this PR.' changed_files_in_PR.txt; then
echo "No bash files have changed in this PR."
else
cat changed_files_in_PR.txt | xargs -I {} shellcheck {} || exit 1
fi
shell: bash

- name: Check Bash lint results
if: success() && steps.lint.outcome == 'success'
run: echo "No styling issues with Bash files."
shell: bash

2 changes: 1 addition & 1 deletion hack/synchronize-istio-cni-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ then
fi

# Create the branch in the manifests repository
if ! git show-ref --verify --quiet refs/heads/$BRANCH; then
if ! git show-ref --verify --quiet refs/heads/$BRANCH; then
git checkout -b $BRANCH
else
echo "Branch $BRANCH already exists."
Expand Down

0 comments on commit ecf78aa

Please sign in to comment.