Skip to content

Commit 6ce9e77

Browse files
committed
ci: fix yamllint issues in workflow updates
Made-with: Cursor
1 parent 52ca5aa commit 6ce9e77

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ jobs:
5555
echo "Changed files:"
5656
echo "$CHANGED_FILES"
5757
58-
if echo "$CHANGED_FILES" | grep -Eq '^(Dockerfile|\.dockerignore|Cargo\.toml|Cargo\.lock|src/|config/|Makefile)'; then
58+
DOCKER_PATTERN='^(Dockerfile|\.dockerignore|Cargo\.toml|Cargo\.lock|src/|config/|Makefile)'
59+
if echo "$CHANGED_FILES" | grep -Eq "$DOCKER_PATTERN"; then
5960
echo "docker=true" >> "$GITHUB_OUTPUT"
6061
else
6162
echo "docker=false" >> "$GITHUB_OUTPUT"
@@ -67,7 +68,8 @@ jobs:
6768
echo "helm=false" >> "$GITHUB_OUTPUT"
6869
fi
6970
70-
if echo "$CHANGED_FILES" | grep -Eq '^(docs/|scripts/generate-api-docs\.py|config/crd/|src/crd/|src/rest_api/|Makefile)'; then
71+
API_DOCS_PATTERN='^(docs/|scripts/generate-api-docs\.py|config/crd/|src/crd/|src/rest_api/|Makefile)'
72+
if echo "$CHANGED_FILES" | grep -Eq "$API_DOCS_PATTERN"; then
7173
echo "api_docs=true" >> "$GITHUB_OUTPUT"
7274
else
7375
echo "api_docs=false" >> "$GITHUB_OUTPUT"
@@ -124,12 +126,14 @@ jobs:
124126
echo "stellar-operator version output: $BIN_VERSION"
125127
126128
[[ "$CARGO_VERSION" == "$EXPECTED_VERSION" ]] || {
127-
echo "::error::Cargo.toml version ($CARGO_VERSION) does not match expected release version ($EXPECTED_VERSION)"
129+
echo "::error::Cargo.toml version ($CARGO_VERSION) does not match expected release version"
130+
echo "::error::Expected: $EXPECTED_VERSION"
128131
exit 1
129132
}
130133
131134
[[ "$BIN_VERSION" == "$EXPECTED_VERSION" ]] || {
132-
echo "::error::stellar-operator version output ($BIN_VERSION) does not match expected release version ($EXPECTED_VERSION)"
135+
echo "::error::stellar-operator version output ($BIN_VERSION) does not match expected release version"
136+
echo "::error::Expected: $EXPECTED_VERSION"
133137
exit 1
134138
}
135139

.github/workflows/pre-commit.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ jobs:
3232
- name: Run pre-commit
3333
run: |
3434
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
35-
git fetch --no-tags origin "${{ github.event.pull_request.base.sha }}" "${{ github.event.pull_request.head.sha }}"
36-
pre-commit run --from-ref "${{ github.event.pull_request.base.sha }}" --to-ref "${{ github.event.pull_request.head.sha }}" --show-diff-on-failure
35+
BASE_SHA="${{ github.event.pull_request.base.sha }}"
36+
HEAD_SHA="${{ github.event.pull_request.head.sha }}"
37+
git fetch --no-tags origin "$BASE_SHA" "$HEAD_SHA"
38+
pre-commit run --from-ref "$BASE_SHA" --to-ref "$HEAD_SHA" --show-diff-on-failure
3739
else
3840
pre-commit run --all-files --show-diff-on-failure
3941
fi

.github/workflows/verify-operator-boot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Verify Operator Boot (Issue #146)
1+
name: "Verify Operator Boot (Issue #146)"
22

33
# Verifies that the operator binary builds and connects to a live kind cluster.
44
# Acceptance criteria:

0 commit comments

Comments
 (0)