From a609f9eafb1a48311ea4c8861b914e0850513984 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Wed, 14 Aug 2024 20:12:30 -0500 Subject: [PATCH] =?utf8?q?=F0=9F=94=A7=20Add=20git=20commit=20and=20push?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .github/workflows/autofix.yml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index d3629c9f91..9539cc6139 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -22,7 +22,7 @@ jobs: id: cache with: path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-autofix-${{ env.pythonLocation }}-${{ hashFiles('requirements-autofix.txt') }}-v01 + key: ${{ runner.os }}-python-autofix-${{ env.pythonLocation }}-${{ hashFiles('requirements-autofix.txt', 'requirements-tests.txt') }}-v01 - name: Install dependencies if: steps.cache.outputs.cache-hit != 'true' run: pip install -r requirements-autofix.txt @@ -35,15 +35,23 @@ jobs: path: ~/.cache/pre-commit key: ${{ runner.os }}-pre-commit-hooks-${{ hashFiles('.pre-commit-config.yml') }}-v01 - run: pre-commit run --files ${{ steps.changed-files.outputs.all_changed_files }} - # Allow debugging with tmate - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - with: - limit-access-to-actor: true + - name: Commit changes + if: failure() + run: | + git config --local user.email "github-actions@github.com" + git config --local user.name "github-actions" + git add --update + git commit -m "🎨 Autofix from pre-commit hooks" + git push + # # Allow debugging with tmate + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 + # with: + # limit-access-to-actor: true - # - name: Deploy Docs Status Pending - # run: python ./scripts/deploy_docs_status.py - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # COMMIT_SHA: ${{ github.event.workflow_run.head_sha }} - # RUN_ID: ${{ github.run_id }} + # # - name: Deploy Docs Status Pending + # # run: python ./scripts/deploy_docs_status.py + # # env: + # # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # # COMMIT_SHA: ${{ github.event.workflow_run.head_sha }} + # # RUN_ID: ${{ github.run_id }} -- 2.47.3