Skip to content

Commit

Permalink
Merge pull request #16 from deeagle/dev/task_add-some-ci
Browse files Browse the repository at this point in the history
Dev/task add some ci
  • Loading branch information
deeagle authored Jul 15, 2024
2 parents ab57367 + 4f0462d commit 3cc2289
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
# MD013/line-length - Line length
MD013:
# Number of characters
line_length: 120
17 changes: 16 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@
"branches": ["main"],
"debug": "true",
"plugins": [
"@semantic-release/commit-analyzer",
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "build",
"scope": "debs",
"release": "patch",
}
],
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"],
},
},
],
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ You can check your xml against:

- DTD
`xmllint --dtdvalid schema.dtd --noout file.txt`

- XSD
`xmllint --schema schema.xsd --noout file.xml`

Expand Down
25 changes: 25 additions & 0 deletions run-ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

set -e
set +x

echo "Running local CI ..."

echo "Running lints ..."

echo "Lint markdown ..."
docker run --rm -v "$(pwd):/app" docdee/mdlint -c /app/.markdownlint.yml -i CHANGELOG.md "**/*.md"

echo "Lint shell scripts ..."
docker run --rm -v "$(pwd):/app" koalaman/shellcheck-alpine:stable find /app -type f -name '*.sh' -exec shellcheck {} +

echo "Lint Dockerfiles ..."
docker_linter_version="$(docker run --rm -i ghcr.io/hadolint/hadolint hadolint -v)"
echo "Using docker-linter version: ${docker_linter_version}"
dockerfiles=$(find . -type f -name "*Dockerfile" -not -path "./vendor/*" -not -path "./tmp/*")
for dockerfile in ${dockerfiles}; do
echo "> lint file: $dockerfile"
docker run --rm -i -v "${PWD}/.hadolint.yml:/.config/hadolint.yml" ghcr.io/hadolint/hadolint < "$dockerfile"
done

echo "CI successfully finished."

0 comments on commit 3cc2289

Please sign in to comment.