File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -22,20 +22,21 @@ jobs:
2222 ref : main # branch to checkout
2323 fetch-depth : 0
2424
25- - name : Get last commit message
26- run : echo "message=$(git log -1 --pretty=%B)" >> $GITHUB_ENV
27-
2825 - name : Check commit message suffix for `[create-release]`
2926 id : check_run_suffix_present
3027 uses : actions/github-script@v7
3128 with :
3229 script : |
30+ // Get last commit message
31+ // context.sha === context.payload.head_commit.id
32+ const lastCommitMessage = context.payload.head_commit.message;
33+ const lastCommitMessageFirstLine = lastCommitMessage.split('\n')[0];
34+
3335 let run_suffix_present = "false";
3436 let run_suffix_force_version = "";
3537
36- const commitMessage = process.env.message;
37- const regex = /\[create-release(?:-([a-z]+))?\]$/;
38- const match = commitMessage.match(regex);
38+ const regex = /\[create-release(?:-([a-z]+))?\]/;
39+ const match = lastCommitMessageFirstLine.match(regex);
3940
4041 if (match) {
4142 run_suffix_present = "true";
You can’t perform that action at this time.
0 commit comments