Skip to content

Merge pull request #2 from mijanr/main #38

Merge pull request #2 from mijanr/main

Merge pull request #2 from mijanr/main #38

Workflow file for this run

name: Update README
on:
push:
branches:
- test
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Replace results in README
# run: |
# results=$(cat results/best_runs.md)
# sed -i '/<!--START-->/, /<!--END-->/c\<!--START-->'"$results"'<!--END-->' README.md
run: |
results=$(cat results/best_runs.md)
awk -v r="$results" '/<!--START-->/ {print; print r; f=1} /<!--END-->/ {f=0} !f' README.md > temp && mv temp README.md
- name: Commit and push if it changed
run: |
git diff
git config --global user.email "[email protected]"
git config --global user.name "Md Mijanur Rahman"
git commit -am "Update README with test results" || exit 0
git push