fix: fix workflow action didn't support crlf (#342)
This commit is contained in:
parent
98942c0b4f
commit
6effd05519
|
@ -11,15 +11,18 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# - name: Install dos2unix
|
||||||
|
# run: apt-get install dos2unix
|
||||||
|
|
||||||
- name: Check name field in YAML files
|
- name: Check name field in YAML files
|
||||||
id: check_name
|
id: check_name
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
find . -type f \( -name "docker-compose.yaml" -or -name "docker-compose.yml" \) | while read -r file; do
|
find . -type f \( -name "docker-compose.yaml" -or -name "docker-compose.yml" \) | while read -r file; do
|
||||||
if ! grep -qP '^name:\s[a-z0-9_-]*$' "$file"; then
|
if ! grep -qP '^name:\s[a-z0-9_-]*\r?$' "$file"; then
|
||||||
echo "There is a problem with the value of name in the submitted yaml, please make sure the value is in the range [a-z0-9_-]. And error file name:$file"
|
echo "There is a problem with the value of name in the submitted yaml, please make sure the value is in the range [a-z0-9_-]. And error file name:$file"
|
||||||
cat $file
|
echo $file
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue