mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
33 lines
1.0 KiB
YAML
33 lines
1.0 KiB
YAML
name: Pre-Commit formatter
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- precommit/**
|
|
|
|
jobs:
|
|
format-code:
|
|
name: "Reformat code"
|
|
runs-on: ubuntu-latest
|
|
if: contains(github.event.head_commit.message, '[reformat code]')
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python ${{ inputs.python-version }}
|
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
with:
|
|
python-version: "3.9"
|
|
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
|
|
continue-on-error: true
|
|
with:
|
|
extra_args: --all-files
|
|
- name: Update secrets baseline
|
|
run: pip install detect-secrets && detect-secrets scan --baseline .secrets.baseline
|
|
- uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.24.1
|
|
with:
|
|
username: ${{ secrets.BOT_GITHUB_USERNAME }}
|
|
add-options: -u
|
|
commit-message: "Apply Pre-Commit code formatting"
|
|
skip-if-no-changes: true
|
|
- name: Push changes
|
|
run: git push
|