Skip to content

docs: format, add short domain (#17) #45

docs: format, add short domain (#17)

docs: format, add short domain (#17) #45

name: validate-docker-compose
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
validate-docker-compose:
name: runner / docker-compose-linter
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dclint
run: npm install --save-dev dclint
# Create config file to allow "latest" tag
- name: Create config file
run: |
cat <<EOL > config.json
{
"rules": {
"service-image-require-explicit-tag": [
1,
{
"prohibitedTags": [
"edge",
"test",
"nightly",
"dev",
"beta",
"canary",
]
}
]
}
}
EOL
- name: Run and Check for linting problems
id: check-dclint-output
run: |
npx dclint . -r -c config.json | tee dclint-output.log || true
if grep -E "✖ [0-9]+ problems" dclint-output.log; then
echo "::error::Linting errors detected"
exit 1
else
echo "No linting problems found"
fi