Skip to content

Commit

Permalink
Summary
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryRyumin committed Jan 12, 2024
1 parent b2c908c commit d0e1135
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/copy_parse_markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ jobs:
run: |
set -e
source show_file_content_step.sh
show_file_content "${{ env.SOURCE_FILE_PATH }}"
show_file_content "${{ env.SOURCE_FILE_PATH }}" "${{ github.event.inputs.display_file_contents }}"
- name: Display content of destination file from target repository
run: |
set -e
source show_file_content_step.sh
show_file_content "${{ env.SOURCE_DESTINATION_FILE_PATH }}"
show_file_content "${{ env.SOURCE_DESTINATION_FILE_PATH }}" "${{ github.event.inputs.display_file_contents }}"
- name: Compare and handle files
run: |
Expand Down
3 changes: 2 additions & 1 deletion scripts/show_file_content.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

show_file_content() {
local file_path=$1
local display_file_contents=$2

if [[ -f "$file_path" ]]; then
if [[ "${DISPLAY_FILE_CONTENTS}" == 'true' ]]; then
if [[ "$display_file_contents" == 'true' ]]; then
echo "Displaying content of the file:"
cat "$file_path"
else
Expand Down

0 comments on commit d0e1135

Please sign in to comment.