diff --git a/.github/workflows/update_readme_workflow.yml b/.github/workflows/update_readme_workflow.yml new file mode 100644 index 0000000..9220294 --- /dev/null +++ b/.github/workflows/update_readme_workflow.yml @@ -0,0 +1,30 @@ +name: Update README + +on: + push: + branches: + - main + +jobs: + update_readme: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: pip install requests + + - name: Run Python script to generate table + run: python generate_table.py > table.md + + - name: Update README + run: | + sed -i '//,//c\\n' table.md '\n/' README.md + sed -i '//r table.md' README.md