Skip to content

Commit d7e0ed5

Browse files
committed
Fix indentations
Signed-off-by: smoshiur1237 <[email protected]>
1 parent 05eb21c commit d7e0ed5

File tree

7 files changed

+313
-311
lines changed

7 files changed

+313
-311
lines changed

.github/workflows/pr-dependabot.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ name: PR dependabot code generation and go modules fix
44
on:
55
pull_request:
66
branches:
7-
- dependabot/**
7+
- dependabot/**
88
push:
99
branches:
10-
- dependabot/**
10+
- dependabot/**
1111
workflow_dispatch:
1212

13+
1314
permissions:
1415
contents: write # Allow to update the PR.
1516

@@ -46,4 +47,4 @@ jobs:
4647
author_name: dependabot[bot]
4748
author_email: 49699333+dependabot[bot]@users.noreply.github.com
4849
default_author: github_actor
49-
message: 'Update generated code'
50+
message: 'Update generated code'

.github/workflows/pr-gh-workflow-approve.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Approve GH Workflows
66

77
on:
88
pull_request_target:
9-
types: [opened, edited, reopened, synchronize, ready_for_review]
9+
types: [ opened, edited, reopened, synchronize, ready_for_review ]
1010

1111
permissions: {}
1212

.github/workflows/pr-link-check.yaml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Check Links In Pull Requests
22

33
on:
44
pull_request:
5-
types: [opened, edited, reopened, synchronize, ready_for_review]
5+
types: [ opened, edited, reopened, synchronize, ready_for_review ]
66

77
permissions: {}
88

@@ -15,58 +15,58 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- name: Clone repository
19-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
20-
with:
21-
fetch-depth: 0
22-
ref: ${{github.event.pull_request.head.ref}}
23-
repository: ${{github.event.pull_request.head.repo.full_name}}
18+
- name: Clone repository
19+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
20+
with:
21+
fetch-depth: 0
22+
ref: ${{github.event.pull_request.head.ref}}
23+
repository: ${{github.event.pull_request.head.repo.full_name}}
2424

25-
- name: Add upstream remote
26-
run: |
27-
upstreamurl="https://github.com/kubernetes-sigs/cluster-api-provider-openstack.git"
28-
git remote add upstream "${upstreamurl}"
29-
git fetch upstream
25+
- name: Add upstream remote
26+
run: |
27+
upstreamurl="https://github.com/kubernetes-sigs/cluster-api-provider-openstack.git"
28+
git remote add upstream "${upstreamurl}"
29+
git fetch upstream
3030
31-
- name: Checkout base branch
32-
run: git checkout "upstream/${{ github.event.pull_request.base.ref }}"
31+
- name: Checkout base branch
32+
run: git checkout "upstream/${{ github.event.pull_request.base.ref }}"
3333

34-
- name: Get list of changed Markdown files
35-
id: changed-files
36-
run: |
37-
git diff --name-only "upstream/${{ github.event.pull_request.base.ref }}...${{ github.head_ref }}" -- "*.md" > changed-files.txt
38-
cat changed-files.txt
39-
if [[ -s "changed-files.txt" ]]; then
40-
echo "Changed md files found"
41-
echo "foundFiles=true" >> "${GITHUB_ENV}"
42-
fi
34+
- name: Get list of changed Markdown files
35+
id: changed-files
36+
run: |
37+
git diff --name-only "upstream/${{ github.event.pull_request.base.ref }}...${{ github.head_ref }}" -- "*.md" > changed-files.txt
38+
cat changed-files.txt
39+
if [[ -s "changed-files.txt" ]]; then
40+
echo "Changed md files found"
41+
echo "foundFiles=true" >> "${GITHUB_ENV}"
42+
fi
4343
44-
- name: Switch to PR branch
45-
run: git checkout ${{ github.head_ref }}
44+
- name: Switch to PR branch
45+
run: git checkout ${{ github.head_ref }}
4646

47-
- name: Check links in changed files
48-
if: env.foundFiles == 'true'
49-
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2.7.0
50-
with:
51-
failIfEmpty: false
52-
args: |
53-
--user-agent "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0"
54-
--root-dir "$(pwd)/"
55-
--fallback-extensions "md"
56-
--github-token "${GITHUB_TOKEN}"
57-
$(cat changed-files.txt | tr '\n' ' ')
47+
- name: Check links in changed files
48+
if: env.foundFiles == 'true'
49+
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2.7.0
50+
with:
51+
failIfEmpty: false
52+
args: |
53+
--user-agent "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0"
54+
--root-dir "$(pwd)/"
55+
--fallback-extensions "md"
56+
--github-token "${GITHUB_TOKEN}"
57+
$(cat changed-files.txt | tr '\n' ' ')
5858
59-
- name: Provide helpful failure message
60-
if: failure()
61-
run: |
62-
echo "::error::Link check failed! Please review the broken links reported above."
63-
echo ""
64-
echo "If certain links are valid but fail due to:"
65-
echo "- CAPTCHA challenges"
66-
echo "- IP blocking"
67-
echo "- Authentication requirements"
68-
echo "- Rate limiting"
69-
echo ""
70-
echo "Consider adding them to .lycheeignore to bypass future checks."
71-
echo "Format: Add one URL pattern per line"
72-
exit 1
59+
- name: Provide helpful failure message
60+
if: failure()
61+
run: |
62+
echo "::error::Link check failed! Please review the broken links reported above."
63+
echo ""
64+
echo "If certain links are valid but fail due to:"
65+
echo "- CAPTCHA challenges"
66+
echo "- IP blocking"
67+
echo "- Authentication requirements"
68+
echo "- Rate limiting"
69+
echo ""
70+
echo "Consider adding them to .lycheeignore to bypass future checks."
71+
echo "Format: Add one URL pattern per line"
72+
exit 1

.github/workflows/pr-verifer.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,51 @@ permissions: {}
33

44
on:
55
pull_request_target:
6-
types: [opened, edited, reopened, synchronize, ready_for_review]
6+
types: [ opened, edited, reopened, synchronize, ready_for_review ]
77

88
jobs:
99
check-title:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Check out repository
13-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
12+
- name: Check out repository
13+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
1414

15-
- name: Validate PR Title
16-
env:
17-
PR_TITLE: ${{ github.event.pull_request.title }}
18-
run: |
19-
WIP_REGEX='^\W?WIP\W'
20-
TAG_REGEX='^\[[[:alnum:]\._-]*\]'
15+
- name: Validate PR Title
16+
env:
17+
PR_TITLE: ${{ github.event.pull_request.title }}
18+
run: |
19+
WIP_REGEX='^\W?WIP\W'
20+
TAG_REGEX='^\[[[:alnum:]\._-]*\]'
2121
22-
# Trim WIP and tags from title
23-
trimmed_title=$(echo "${PR_TITLE}" | sed -E "s/${WIP_REGEX}//" | sed -E "s/${TAG_REGEX}//" | xargs)
22+
# Trim WIP and tags from title
23+
trimmed_title=$(echo "${PR_TITLE}" | sed -E "s/${WIP_REGEX}//" | sed -E "s/${TAG_REGEX}//" | xargs)
2424
25-
# Normalize common emojis in text form to actual emojis
26-
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:warning:/⚠/g")
27-
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:sparkles:/✨/g")
28-
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:bug:/🐛/g")
29-
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:book:/📖/g")
30-
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:rocket:/🚀/g")
31-
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:seedling:/🌱/g")
25+
# Normalize common emojis in text form to actual emojis
26+
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:warning:/⚠/g")
27+
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:sparkles:/✨/g")
28+
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:bug:/🐛/g")
29+
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:book:/📖/g")
30+
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:rocket:/🚀/g")
31+
trimmed_title=$(echo "$trimmed_title" | sed -E "s/:seedling:/🌱/g")
3232
33-
# Check PR type prefix
34-
if [[ "${trimmed_title}" =~ ^(⚠|✨|🐛|📖|🚀|🌱) ]]; then
35-
echo "PR title is valid: $trimmed_title"
36-
else
37-
echo "Error: No matching PR type indicator found in title."
38-
echo "You need to have one of these as the prefix of your PR title:"
39-
echo "- Breaking change: ⚠ (:warning:)"
40-
echo "- Non-breaking feature: ✨ (:sparkles:)"
41-
echo "- Patch fix: 🐛 (:bug:)"
42-
echo "- Docs: 📖 (:book:)"
43-
echo "- Release: 🚀 (:rocket:)"
44-
echo "- Infra/Tests/Other: 🌱 (:seedling:)"
45-
exit 1
46-
fi
33+
# Check PR type prefix
34+
if [[ "${trimmed_title}" =~ ^(⚠|✨|🐛|📖|🚀|🌱) ]]; then
35+
echo "PR title is valid: $trimmed_title"
36+
else
37+
echo "Error: No matching PR type indicator found in title."
38+
echo "You need to have one of these as the prefix of your PR title:"
39+
echo "- Breaking change: ⚠ (:warning:)"
40+
echo "- Non-breaking feature: ✨ (:sparkles:)"
41+
echo "- Patch fix: 🐛 (:bug:)"
42+
echo "- Docs: 📖 (:book:)"
43+
echo "- Release: 🚀 (:rocket:)"
44+
echo "- Infra/Tests/Other: 🌱 (:seedling:)"
45+
exit 1
46+
fi
4747
48-
# Check that PR title does not contain Issue or PR number
49-
if [[ "${trimmed_title}" =~ \#[0-9]+ ]]; then
50-
echo "Error: PR title should not contain issue or PR number."
51-
echo "Issue numbers belong in the PR body as either \"Fixes #XYZ\" (if it closes the issue or PR), or something like \"Related to #XYZ\" (if it's just related)."
52-
exit 1
53-
fi
48+
# Check that PR title does not contain Issue or PR number
49+
if [[ "${trimmed_title}" =~ \#[0-9]+ ]]; then
50+
echo "Error: PR title should not contain issue or PR number."
51+
echo "Issue numbers belong in the PR body as either \"Fixes #XYZ\" (if it closes the issue or PR), or something like \"Related to #XYZ\" (if it's just related)."
52+
exit 1
53+
fi

.github/workflows/security-scan.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
branch: [main, release-0.13, release-0.12]
16+
branch: [ main, release-0.13, release-0.12 ]
1717
name: Trivy
1818
runs-on: ubuntu-latest
1919
steps:

.github/workflows/update-golangci-lint.yaml

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name: Update golangci-lint version
22

33
on:
44
schedule:
5-
- cron: '0 0 * * *' # Runs every day at midnight UTC
6-
workflow_dispatch: # Allows manual triggering
5+
- cron: '0 0 * * *' # Runs every day at midnight UTC
6+
workflow_dispatch:
7+
# Allows manual triggering
78

89
permissions:
910
contents: write
@@ -16,37 +17,37 @@ jobs:
1617
latest_version: ${{ steps.get_version.outputs.latest_version }}
1718
current_version: ${{ steps.check_version.outputs.current_version }}
1819
steps:
19-
- name: Checkout repository
20-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
21-
with:
22-
fetch-depth: 0
23-
- name: Get latest golangci-lint version
24-
id: get_version
25-
run: |
26-
export LATEST_VERSION=$(curl -s https://api.github.com/repos/golangci/golangci-lint/releases/latest | jq -r .tag_name)
27-
echo "LATEST_VERSION=${LATEST_VERSION}" >> $GITHUB_ENV
28-
echo "LATEST_VERSION=${LATEST_VERSION}" >> $GITHUB_OUTPUT
29-
- name: Check current version in Makefile
30-
id: check_version
31-
run: |
32-
export CURRENT_VERSION=$(grep 'GOLANGCI_LINT_VERSION ?=' hack/tools/Makefile | cut -d '=' -f2 | tr -d ' ')
33-
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
34-
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
35-
- name: Update Makefile if needed
36-
if: ${{ steps.check_version.outputs.current_version != steps.get_version.outputs.latest_version }}
37-
run: |
38-
sed -i "s/GOLANGCI_LINT_VERSION ?= .*/GOLANGCI_LINT_VERSION ?= ${{ steps.get_version.outputs.latest_version }}/" hack/tools/Makefile
39-
- name: Create Pull Request
40-
if: ${{ steps.check_version.outputs.current_version != steps.get_version.outputs.latest_version }}
41-
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # tag=v7.0.8
42-
with:
43-
commit-message: "This commit updates golangci-lint to version v${{ steps.get_version.outputs.latest_version }}."
44-
title: ":seedling: chore: bump golangci-lint to v${{ steps.get_version.outputs.latest_version }}"
45-
body: |
46-
This PR was generated by GH workflow `update-golangci-lint` and
47-
updates golangci-lint to version v${{ steps.get_version.outputs.latest_version }}.
48-
branch: update-golangci-lint-${{ steps.get_version.outputs.latest_version }}
49-
base: main
50-
labels: "area/dependency"
51-
add-paths: |
52-
hack/tools/Makefile
20+
- name: Checkout repository
21+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
22+
with:
23+
fetch-depth: 0
24+
- name: Get latest golangci-lint version
25+
id: get_version
26+
run: |
27+
export LATEST_VERSION=$(curl -s https://api.github.com/repos/golangci/golangci-lint/releases/latest | jq -r .tag_name)
28+
echo "LATEST_VERSION=${LATEST_VERSION}" >> $GITHUB_ENV
29+
echo "LATEST_VERSION=${LATEST_VERSION}" >> $GITHUB_OUTPUT
30+
- name: Check current version in Makefile
31+
id: check_version
32+
run: |
33+
export CURRENT_VERSION=$(grep 'GOLANGCI_LINT_VERSION ?=' hack/tools/Makefile | cut -d '=' -f2 | tr -d ' ')
34+
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
35+
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
36+
- name: Update Makefile if needed
37+
if: ${{ steps.check_version.outputs.current_version != steps.get_version.outputs.latest_version }}
38+
run: |
39+
sed -i "s/GOLANGCI_LINT_VERSION ?= .*/GOLANGCI_LINT_VERSION ?= ${{ steps.get_version.outputs.latest_version }}/" hack/tools/Makefile
40+
- name: Create Pull Request
41+
if: ${{ steps.check_version.outputs.current_version != steps.get_version.outputs.latest_version }}
42+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # tag=v7.0.8
43+
with:
44+
commit-message: "This commit updates golangci-lint to version v${{ steps.get_version.outputs.latest_version }}."
45+
title: ":seedling: chore: bump golangci-lint to v${{ steps.get_version.outputs.latest_version }}"
46+
body: |
47+
This PR was generated by GH workflow `update-golangci-lint` and
48+
updates golangci-lint to version v${{ steps.get_version.outputs.latest_version }}.
49+
branch: update-golangci-lint-${{ steps.get_version.outputs.latest_version }}
50+
base: main
51+
labels: "area/dependency"
52+
add-paths: |
53+
hack/tools/Makefile

0 commit comments

Comments
 (0)