From afb52bc788279f7209105ca94e63e048a359ef94 Mon Sep 17 00:00:00 2001 From: Chesnokov Gleb Date: Mon, 10 Jan 2022 18:12:52 +0300 Subject: [PATCH] Add a list of files per commit for github Mailing list action --- .github/workflows/mail_notification.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mail_notification.yml b/.github/workflows/mail_notification.yml index 02df84365..f31f7d4fe 100644 --- a/.github/workflows/mail_notification.yml +++ b/.github/workflows/mail_notification.yml @@ -36,6 +36,17 @@ jobs: run: | echo ::set-output name=comm_message::$(git log --format=%s -n 1 HEAD) + - name: Get list of files + id: get_list_files + run: | + files="$(git diff-tree --no-commit-id --name-only -r HEAD)" + + files="${files//'%'/'%25'}" + files="${files//$'\n'/'%0A'}" + files="${files//$'\r'/'%0D'}" + + echo ::set-output name=files::"$files" + - name: Get commit diff id: get_comm_diff run: | @@ -77,9 +88,14 @@ jobs: Author: ${{matrix.commit.author.name}} Date: ${{matrix.commit.timestamp}} Log Message: - ------------------------------ + ---------------------- ${{matrix.commit.message}} - ============================== + + Modified Paths: + ---------------------------- + ${{steps.get_list_files.outputs.files}} + + =================================================================== ${{steps.get_comm_diff.outputs.comm_diff}} # Optional unsigned/invalid certificates allowance: