From 06fe6df1ecd3adc8b2f54fd40f98c8a0efe8d52f Mon Sep 17 00:00:00 2001 From: Aurumaker72 <48759429+Aurumaker72@users.noreply.github.com> Date: Thu, 2 Jan 2025 06:40:50 -0800 Subject: [PATCH] Actions/Dev: Use super-linter --- .github/workflows/lint.yml | 51 ++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0fbfa22b..2d4f4da3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,31 +1,34 @@ +--- name: Lint -on: - # Trigger the workflow on push or pull request, - # but only for the main branch - push: - branches: - - feature/action-lint - pull_request: - branches: - - feature/action-lint +on: # yamllint disable-line rule:truthy + push: null + pull_request: null + +permissions: + contents: read jobs: - run-linters: - name: Run linters + fix-lint-issues: + permissions: + contents: write + statuses: write runs-on: ubuntu-latest - steps: - - name: Check out Git repository - uses: actions/checkout@v4 - - - name: Install ClangFormat - run: sudo apt-get install -y clang-format - - - name: Run linters - uses: wearerequired/lint-action@v2.3.0 + - uses: actions/checkout@v4 with: - clang_format: true - clang_format_auto_fix: true - auto_fix: true - + fetch-depth: 0 + - name: Super-Linter + uses: super-linter/super-linter@v7.2.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FIX_CLANG_FORMAT: true + - name: Commit and push linting fixes + if: > + github.event_name == 'push' + uses: stefanzweifel/git-auto-commit-action@v5 + with: + branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }} + commit_message: "Chore/Dev: Run clang-format" + commit_user_name: super-linter + commit_user_email: super-linter@super-linter.dev