Skip to content

Commit

Permalink
Update best_runs content in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mijanr committed Mar 16, 2024
1 parent b9472ee commit 6c2eb95
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/update_readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
run: |
# Read the content of best_runs.md file
content=$(cat results/best_runs.md)
echo "Content from best_runs.md:"
echo "$content"
- name: Update README.md
Expand All @@ -26,7 +27,13 @@ jobs:
# Replace content between <!--START_SECTION:best_runs--> and <!--END_SECTION:best_runs-->
new_content="<!--START_SECTION:best_runs-->\n$content\n<!--END_SECTION:best_runs-->"
echo "New content for README.md:"
echo "$new_content"
# Perform content replacement using sed
updated_readme_content=$(echo "$readme_content" | sed -e '/<!--START_SECTION:best_runs-->/, /<!--END_SECTION:best_runs-->/c\'"$new_content")
echo "Updated README.md content:"
echo "$updated_readme_content"
# Update README.md
echo "$updated_readme_content" > README.md
Expand Down

0 comments on commit 6c2eb95

Please sign in to comment.