@@ -67,36 +67,36 @@ jobs:
67
67
68
68
- name : Check whether there are new todos
69
69
run : |
70
- CREATE_COMMIT =no
70
+ PUZZLES_FILES_MODIFIED =no
71
71
72
72
if [ ! -f generated-todos/pdd.xml ]; then
73
73
echo 'pdd.xml has just been created'
74
- CREATE_COMMIT =yes
74
+ PUZZLES_FILES_MODIFIED =yes
75
75
elif ! diff --brief generated-todos/pdd.xml pdd.xml >/dev/null; then
76
76
echo 'pdd.xml has been modified'
77
- CREATE_COMMIT =yes
77
+ PUZZLES_FILES_MODIFIED =yes
78
78
fi
79
79
80
80
if [ ! -f generated-todos/todos-in-code.tsv ]; then
81
81
echo 'todos-in-code.tsv has just been created'
82
- CREATE_COMMIT =yes
82
+ PUZZLES_FILES_MODIFIED =yes
83
83
elif ! diff --brief generated-todos/todos-in-code.tsv todos-in-code.tsv >/dev/null; then
84
84
echo 'todos-in-code.tsv has been modified'
85
- CREATE_COMMIT =yes
85
+ PUZZLES_FILES_MODIFIED =yes
86
86
fi
87
87
88
- if [ "$CREATE_COMMIT " = 'yes' ]; then
88
+ if [ "$PUZZLES_FILES_MODIFIED " = 'yes' ]; then
89
89
printf 'pdd.xml: %d puzzles\n' "$(grep -c '<puzzle>' pdd.xml)"
90
90
printf 'todos-in-code.tsv: %d todos\n' "$(sed 1d todos-in-code.tsv | wc -l)"
91
91
else
92
92
echo 'neither pdd.xml nor todos-in-code.tsv have been modified'
93
93
fi
94
94
95
95
# Make variable available for the next steps
96
- echo "CREATE_COMMIT=$CREATE_COMMIT " | tee -a "$GITHUB_ENV"
96
+ echo "PUZZLES_FILES_MODIFIED=$PUZZLES_FILES_MODIFIED " | tee -a "$GITHUB_ENV"
97
97
98
98
- name : Collect information about the original commit
99
- if : env.CREATE_COMMIT == 'yes'
99
+ if : env.PUZZLES_FILES_MODIFIED == 'yes'
100
100
run : |
101
101
# Make variables available for the next steps
102
102
(
@@ -106,7 +106,7 @@ jobs:
106
106
) | tee -a "$GITHUB_ENV"
107
107
108
108
- name : Commit the changes
109
- if : env.CREATE_COMMIT == 'yes'
109
+ if : env.PUZZLES_FILES_MODIFIED == 'yes'
110
110
env :
111
111
GIT_AUTHOR_NAME : " GitHub Action on behalf of ${{ env.AUTHOR_NAME }}"
112
112
GIT_COMMITTER_NAME : " GitHub Action on behalf of ${{ env.AUTHOR_NAME }}"
0 commit comments