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