Skip to content

Commit

Permalink
- Wrong a mirror's config
Browse files Browse the repository at this point in the history
  • Loading branch information
soksanichenko committed Apr 17, 2024
1 parent e7872f6 commit fa58450
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ jobs:
- name: Check YAML configs
run: |
set -x
mirror_regexp="mirrors.d/.*.(yml)$"
mirror_regexp="mirrors.d/.*.(yml)"
modified_files="${{ steps.files.outputs.added_modified }} ${{steps.files.outputs.renamed}}"
if ! echo "${modified_files}" | grep -E "${mirror_regexp}"; then
if ! echo "${modified_files}" | grep -E "${mirror_regexp}" &> /dev/null; then
# we check only the main config if PR doesn't contain any new or modified mirror config
python3.9 gh_ci/config_checker.py -sc config.yml
else
changed_files=""
for changed_file in ${modified_files}; do
if echo "${changed_file}" | grep -E "${mirror_regexp}"; then
if echo "${changed_file}" | grep -E "${mirror_regexp}$" &> /dev/null; then
changed_files="${changed_file} ${changed_files}"
elif echo "${changed_file}" | grep "mirrors.d"; then
elif echo "${changed_file}" | grep "mirrors.d" &> /dev/null; then
echo "You add a config with wrong extension. Should be *.yml"
exit 1
fi
Expand Down

0 comments on commit fa58450

Please sign in to comment.