@@ -25,40 +25,62 @@ jobs:
25
25
sudo apt-get update
26
26
sudo apt-get install -y yq
27
27
28
- - name : Get list of changed files
28
+ - name : Read new meta files
29
29
id : changed-files
30
30
uses : jitterbit/get-changed-files@v1
31
-
32
- - name : Filter for newly added YAMLs in modules-metadata/
33
- id : new-yaml-files
34
31
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}."
51
41
if [ "$file" = "modules-metadata/exampleJaspModule.yaml" ]; then
52
42
echo "Skipping example module: $name"
53
43
continue
54
44
fi
55
45
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")
58
48
echo "Found: name=$name, url=$url"
59
49
# Do other checks here
60
50
# Check if remote repo exists
61
51
# Check if it is a valid JASP module
62
52
# etc.
63
53
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