pls work
This commit is contained in:
parent
518c930eb2
commit
5bd9674e90
1 changed files with 45 additions and 37 deletions
82
.github/workflows/lint.yml
vendored
82
.github/workflows/lint.yml
vendored
|
|
@ -1,53 +1,61 @@
|
|||
name: Lint Codebase
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: write
|
||||
workflows: write
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: github.event_name == 'pull_request'
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
if: github.event_name != 'pull_request'
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
./bun_modules
|
||||
./node_modules
|
||||
./bun.lock
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Fix JS Lint
|
||||
run: npm run lint:js -- --fix
|
||||
continue-on-error: true
|
||||
- name: Run JS Lint
|
||||
run: bun run lint:js -- --fix
|
||||
continue-on-error: true
|
||||
|
||||
- name: Fix CSS Lint
|
||||
run: npm run lint:css -- --fix
|
||||
continue-on-error: true
|
||||
- name: Run CSS Lint
|
||||
run: bun run lint:css -- --fix
|
||||
continue-on-error: true
|
||||
|
||||
- name: Format with Prettier
|
||||
run: npm run format
|
||||
continue-on-error: true
|
||||
- name: Format with Prettier
|
||||
run: bun run format
|
||||
continue-on-error: true
|
||||
|
||||
- name: Commit and Push changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: 'style: auto-fix linting issues'
|
||||
- name: Commit and Push lint fixes
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: 'style: auto-fix linting issues'
|
||||
commit_user_name: 'github-actions[bot]'
|
||||
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
|
||||
only_if_changed: true
|
||||
|
||||
- name: Run HTML Lint
|
||||
run: npm run lint:html
|
||||
- name: Run HTML Lint
|
||||
run: bun run lint:html
|
||||
|
|
|
|||
Loading…
Reference in a new issue