File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -71,22 +71,30 @@ jobs:
7171 id : check-app-js
7272 continue-on-error : true
7373 uses : actions/github-script@v7
74+ env :
75+ CHANGED_FILES : ${{ steps.changed-files.outputs.all_changed_files }}
76+ TARGET_FILE : src/static/app.js
7477 with :
7578 script : |
76- const changedFiles = '${{ steps.changed-files.outputs.all_changed_files }}'.split(' ');
77- if (!changedFiles.includes('src/static/app.js')) {
78- core.setFailed('src/static/app.js was not modified');
79+ const changedFiles = process.env.CHANGED_FILES.split(' ');
80+ const targetFile = process.env.TARGET_FILE;
81+ if (!changedFiles.includes(targetFile)) {
82+ core.setFailed(`${targetFile} was not modified`);
7983 }
8084
8185 - name : Check if styles.css was modified
8286 id : check-styles-css
8387 continue-on-error : true
8488 uses : actions/github-script@v7
89+ env :
90+ CHANGED_FILES : ${{ steps.changed-files.outputs.all_changed_files }}
91+ TARGET_FILE : src/static/styles.css
8592 with :
8693 script : |
87- const changedFiles = '${{ steps.changed-files.outputs.all_changed_files }}'.split(' ');
88- if (!changedFiles.includes('src/static/styles.css')) {
89- core.setFailed('src/static/styles.css was not modified');
94+ const changedFiles = process.env.CHANGED_FILES.split(' ');
95+ const targetFile = process.env.TARGET_FILE;
96+ if (!changedFiles.includes(targetFile)) {
97+ core.setFailed(`${targetFile} was not modified`);
9098 }
9199
92100 - name : Update comment - step results
You can’t perform that action at this time.
0 commit comments