Skip to content

Commit

Permalink
Actions/Dev: Use super-linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurumaker72 authored Jan 2, 2025
1 parent 723d725 commit 06fe6df
Showing 1 changed file with 27 additions and 24 deletions.
51 changes: 27 additions & 24 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 06fe6df

Please sign in to comment.