Skip to content

Commit 9e9a5b4

Browse files
authored
(MAINT) Fix for dependabot.yml and exclude it from yamlfix (#492)
* Update dependabot.yml * fix(workflows): update yamlformatter paths to include all directories - Changed the paths in yamlformatter.yml to '**/*.yml' and '**/*.yaml' to ensure all YAML files in any directory are formatted. * fix(workflows): update yamlfix-action version to v1.0.8 - Changed the version of comfucios/yamlfix-action from 1.0.8 to v1.0.8 in yamlformatter.yml. * Apply Yamlfix format changes. * fix(workflows): remove dependabot.yml from changed_files.txt - Added a sed command to remove dependabot.yml from changed_files.txt in yamlformatter.yml. * fix(workflows): ensure removal of dependabot.yml from changed_files.txt without failure - Added a sed command to remove dependabot.yml from changed_files.txt in yamlformatter.yml. - Ensured the command does not fail if dependabot.yml does not exist in the list. * Apply Yamlfix format changes. * fix(workflows): ensure removal of .github/dependabot.yml from changed_files.txt without failure - Updated sed command to remove .github/dependabot.yml from changed_files.txt in yamlformatter.yml. - Ensured the command does not fail if .github/dependabot.yml does not exist in the list. * Apply Yamlfix format changes. * fix(workflow): correct sed command for removing dependabot.yml The sed command was updated to remove the unnecessary empty string argument for compatibility. This change ensures that the dependabot.yml file is correctly excluded from the list of changed YAML files. --------- Co-authored-by: CoMfUcIoS <[email protected]>
1 parent 9b0d70d commit 9e9a5b4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ updates:
66
directory: /
77
schedule:
88
interval: daily
9-
time: 13:00
9+
time: '13:00'
1010
open-pull-requests-limit: 10

.github/workflows/yamlformatter.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Format yaml files
33
on:
44
pull_request:
55
branches: [main]
6-
paths: ['*.yml', '*.yaml']
6+
paths: ['**/*.yml', '**/*.yaml']
77
permissions:
88
contents: write
99
pull-requests: write
@@ -22,11 +22,14 @@ jobs:
2222
id: changed_yaml_files
2323
run: |
2424
echo ${{ steps.get_file_changes.outputs.files }} | xargs -n 1 | grep -E "\.yml$|\.yaml$" > changed_files.txt
25+
# Remove dependabot.yml if it exists in the list
26+
sed -i '/.github\/dependabot.yml/d' changed_files.txt || true
2527
yaml_files=$(cat changed_files.txt | tr '\n' ' ')
28+
rm changed_files.txt
2629
echo "files=${yaml_files}" >> $GITHUB_OUTPUT
2730
- name: Yamlfix
2831
id: yamlfix
29-
uses: comfucios/yamlfix-action@1.0.8
32+
uses: comfucios/yamlfix-action@v1.0.8
3033
with:
3134
files: ${{ steps.changed_yaml_files.outputs.files }}
3235
- name: commit-changes

0 commit comments

Comments
 (0)