Skip to content

Commit 0e174af

Browse files
committed
fix(lint/yaml): resolve workflow yamllint issues
1 parent b654fa5 commit 0e174af

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/container.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,15 @@ jobs:
8080
echo "continue=true" >> $GITHUB_OUTPUT
8181
echo "On \`develop\` Branch, Type: \`development\`"
8282
83-
elif [[ $(echo "${{ github.ref }}" | grep -P '^(refs\/heads\/releases\/)(v)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$') ]]; then
83+
elif [[ "${{ github.ref }}" =~ ^refs/heads/releases/ ]]; then
84+
semver_regex='^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(\.(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*))?(\+([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$'
85+
version=$(echo "${{ github.ref }}" | sed -n -E 's#^refs/heads/releases/##p')
86+
87+
if [[ ! "$version" =~ $semver_regex ]]; then
88+
echo "Not a valid release branch semver. Will Not Continue"
89+
exit 0
90+
fi
8491
85-
version=$(echo "${{ github.ref }}" | sed -n -E 's/^(refs\/heads\/releases\/)//p')
8692
echo "version=$version" >> $GITHUB_OUTPUT
8793
echo "type=release" >> $GITHUB_OUTPUT
8894
echo "continue=true" >> $GITHUB_OUTPUT

.github/workflows/coverage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- id: coverage
4545
name: Generate Coverage Report
4646
run: |
47-
cargo clean
47+
cargo clean
4848
cargo llvm-cov --all-features --workspace --codecov --output-path ./codecov.json
4949
5050
- id: upload
@@ -54,4 +54,4 @@ jobs:
5454
verbose: true
5555
token: ${{ secrets.CODECOV_TOKEN }}
5656
files: ${{ github.workspace }}/codecov.json
57-
fail_ci_if_error: true
57+
fail_ci_if_error: true

.github/workflows/generate_coverage_pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- id: coverage
4545
name: Generate Coverage Report
4646
run: |
47-
cargo clean
47+
cargo clean
4848
cargo llvm-cov --all-features --workspace --codecov --output-path ./codecov.json
4949
5050
- name: Store PR number and commit SHA

0 commit comments

Comments
 (0)