|
@ -22,7 +22,7 @@ jobs: |
|
|
id: cache |
|
|
id: cache |
|
|
with: |
|
|
with: |
|
|
path: ${{ env.pythonLocation }} |
|
|
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 |
|
|
- name: Install dependencies |
|
|
if: steps.cache.outputs.cache-hit != 'true' |
|
|
if: steps.cache.outputs.cache-hit != 'true' |
|
|
run: pip install -r requirements-autofix.txt |
|
|
run: pip install -r requirements-autofix.txt |
|
@ -35,15 +35,23 @@ jobs: |
|
|
path: ~/.cache/pre-commit |
|
|
path: ~/.cache/pre-commit |
|
|
key: ${{ runner.os }}-pre-commit-hooks-${{ hashFiles('.pre-commit-config.yml') }}-v01 |
|
|
key: ${{ runner.os }}-pre-commit-hooks-${{ hashFiles('.pre-commit-config.yml') }}-v01 |
|
|
- run: pre-commit run --files ${{ steps.changed-files.outputs.all_changed_files }} |
|
|
- run: pre-commit run --files ${{ steps.changed-files.outputs.all_changed_files }} |
|
|
# Allow debugging with tmate |
|
|
- name: Commit changes |
|
|
- name: Setup tmate session |
|
|
if: failure() |
|
|
uses: mxschmitt/action-tmate@v3 |
|
|
run: | |
|
|
with: |
|
|
git config --local user.email "github-actions@github.com" |
|
|
limit-access-to-actor: true |
|
|
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 |
|
|
# # - name: Deploy Docs Status Pending |
|
|
# run: python ./scripts/deploy_docs_status.py |
|
|
# # run: python ./scripts/deploy_docs_status.py |
|
|
# env: |
|
|
# # env: |
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
|
# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
|
# COMMIT_SHA: ${{ github.event.workflow_run.head_sha }} |
|
|
# # COMMIT_SHA: ${{ github.event.workflow_run.head_sha }} |
|
|
# RUN_ID: ${{ github.run_id }} |
|
|
# # RUN_ID: ${{ github.run_id }} |
|
|