Skip to content

Commit

Permalink
Testing working of Bash linting
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 a290e0d commit 2382e5a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/yaml_formatter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@ jobs:
run: cat changed_files_in_PR.txt

- name: Run yamllint on changed files
id: lint
run: |
if [ -s changed_files_in_PR.txt ]; then
cat changed_files_in_PR.txt | xargs -I {} yamllint {} || exit 1
else
if grep -q 'No YAML files have changed in this PR.' changed_files_in_PR.txt; then
echo "No YAML files have changed in this PR."
else
cat changed_files_in_PR.txt | xargs -I {} yamllint {} || exit 1
fi
shell: bash

- name: Check YAML lint results
if: success()
if: success() && steps.lint.outcome == 'success'
run: echo "No styling issues with YAML files."
shell: bash
12 changes: 6 additions & 6 deletions common/cert-manager/cert-manager/base/cert-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: certificaterequests.cert-manager.io
labels:
app: 'cert-manager'
app.kubernetes.io/name: 'cert-manager'
app.kubernetes.io/instance: 'cert-manager'
# Generated labels
app.kubernetes.io/version: "v1.14.5"
labels:
app: 'cert-manager'
app.kubernetes.io/name: 'cert-manager'
app.kubernetes.io/instance: 'cert-manager'
# Generated labels
app.kubernetes.io/version: "v1.14.5"
spec:
group: cert-manager.io
names:
Expand Down
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 2382e5a

Please sign in to comment.