Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Commit b586a5a

Browse files
committed
update check meta files workflow
1 parent 0943a6d commit b586a5a

File tree

1 file changed

+45
-23
lines changed

1 file changed

+45
-23
lines changed

.github/workflows/check-meta-files.yml

Lines changed: 45 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,40 +25,62 @@ jobs:
2525
sudo apt-get update
2626
sudo apt-get install -y yq
2727
28-
- name: Get list of changed files
28+
- name: Read new meta files
2929
id: changed-files
3030
uses: jitterbit/get-changed-files@v1
31-
32-
- name: Filter for newly added YAMLs in modules-metadata/
33-
id: new-yaml-files
3431
run: |
35-
echo "Filtering added YAML files in modules-metadata/"
36-
echo "" > new_yaml_files.txt
37-
38-
for file in ${{ steps.changed-files.outputs.added }}; do
39-
if [[ "$file" == modules-metadata/*.yml || "$file" == modules-metadata/*.yaml ]]; then
40-
echo "$file" >> new_yaml_files.txt
41-
fi
42-
done
43-
44-
echo "New YAML files:"
45-
cat new_yaml_files.txt
46-
47-
- name: Parse YAML files
48-
run: |
49-
mkdir -p beta-modules
50-
while read file; do
32+
echo "Changed files:"
33+
echo "${{ steps.changed-files.outputs.added }}"
34+
echo "${{ steps.changed-files.outputs.modified }}"
35+
echo "${{ steps.changed-files.outputs.deleted }}"
36+
echo "${{ steps.changed-files.outputs.renamed }}"
37+
echo "${{ steps.changed-files.outputs.type}}"
38+
echo "${{ steps.changed-files.outputs.total}}"
39+
for file in ${{ steps.files.outputs.added }}; do
40+
echo "Do something with this ${file}."
5141
if [ "$file" = "modules-metadata/exampleJaspModule.yaml" ]; then
5242
echo "Skipping example module: $name"
5343
continue
5444
fi
5545
echo "Processing $file"
56-
url=$(yq '.gitUrl' "$file")
57-
name=$(yq '.name' "$file")
46+
url=$(yq -r '.gitUrl' "$file")
47+
name=$(yq -r '.name' "$file")
5848
echo "Found: name=$name, url=$url"
5949
# Do other checks here
6050
# Check if remote repo exists
6151
# Check if it is a valid JASP module
6252
# etc.
6353
64-
done < new_yaml_files.txt
54+
done
55+
56+
# - name: Filter for newly added YAMLs in modules-metadata/
57+
# id: new-yaml-files
58+
# run: |
59+
# echo "Filtering added YAML files in modules-metadata/"
60+
#
61+
# for file in ${{ steps.changed-files.outputs.added }}; do
62+
# if [[ "$file" == modules-metadata/*.yml || "$file" == modules-metadata/*.yaml ]]; then
63+
# echo "$file" >> new_yaml_files.txt
64+
# fi
65+
# done
66+
#
67+
# echo "New YAML files:"
68+
# cat new_yaml_files.txt
69+
#
70+
# - name: Parse YAML files
71+
# run: |
72+
# while read file; do
73+
# if [ "$file" = "modules-metadata/exampleJaspModule.yaml" ]; then
74+
# echo "Skipping example module: $name"
75+
# continue
76+
# fi
77+
# echo "Processing $file"
78+
# url=$(yq -r '.gitUrl' "$file")
79+
# name=$(yq -r '.name' "$file")
80+
# echo "Found: name=$name, url=$url"
81+
# # Do other checks here
82+
# # Check if remote repo exists
83+
# # Check if it is a valid JASP module
84+
# # etc.
85+
#
86+
# done < new_yaml_files.txt

0 commit comments

Comments
 (0)