From d4b19db0c64f48e728322f3b4a0b1b193626706d Mon Sep 17 00:00:00 2001 From: SkalskiP Date: Mon, 28 Nov 2022 12:09:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20automated=20notebooks=20table=20?= =?UTF-8?q?rebuild?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ld-readme-notebooks-table-on-pr-merge-to-main.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rebuild-readme-notebooks-table-on-pr-merge-to-main.yml b/.github/workflows/rebuild-readme-notebooks-table-on-pr-merge-to-main.yml index 67d6c15..840c965 100644 --- a/.github/workflows/rebuild-readme-notebooks-table-on-pr-merge-to-main.yml +++ b/.github/workflows/rebuild-readme-notebooks-table-on-pr-merge-to-main.yml @@ -9,11 +9,19 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} - uses: actions/setup-python@v4 with: python-version: 3.9 - - run: python automation/autogenerate_notebooks_table.py - - run: | + - name: Rebuild notebooks table in project README.md + run: python automation/autogenerate_notebooks_table.py + - name: Check for modified files + id: git-check + run: echo ::set-output name=modified::$(if [ -n "$(git status --porcelain)" ]; then echo "true"; else echo "false"; fi) + - name: Update changes in GitHub repository + if: steps.git-check.outputs.modified == 'true' + run: | git config --global user.name 'SkalskiP' git config --global user.email 'SkalskiP@users.noreply.github.com' git commit -am "🤖 hello friend, the notebooks table has been rebuilt"