fix(lint): update permissions for workflow actions
- Changed permissions from 'workflows: write' to 'actions: write'
This commit is contained in:
parent
ade3191965
commit
a4b46c3520
1 changed files with 45 additions and 45 deletions
90
.github/workflows/lint.yml
vendored
90
.github/workflows/lint.yml
vendored
|
|
@ -1,61 +1,61 @@
|
||||||
name: Lint Codebase
|
name: Lint Codebase
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
workflows: write
|
actions: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Setup Bun
|
- name: Setup Bun
|
||||||
uses: oven-sh/setup-bun@v1
|
uses: oven-sh/setup-bun@v1
|
||||||
with:
|
with:
|
||||||
bun-version: latest
|
bun-version: latest
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
./bun_modules
|
./bun_modules
|
||||||
./node_modules
|
./node_modules
|
||||||
./bun.lock
|
./bun.lock
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
|
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run JS Lint
|
- name: Run JS Lint
|
||||||
run: bun run lint:js -- --fix
|
run: bun run lint:js -- --fix
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Run CSS Lint
|
- name: Run CSS Lint
|
||||||
run: bun run lint:css -- --fix
|
run: bun run lint:css -- --fix
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Format with Prettier
|
- name: Format with Prettier
|
||||||
run: bun run format
|
run: bun run format
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Commit and Push lint fixes
|
- name: Commit and Push lint fixes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v5
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
commit_message: 'style: auto-fix linting issues'
|
commit_message: 'style: auto-fix linting issues'
|
||||||
commit_user_name: 'github-actions[bot]'
|
commit_user_name: 'github-actions[bot]'
|
||||||
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
|
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
|
||||||
only_if_changed: true
|
only_if_changed: true
|
||||||
|
|
||||||
- name: Run HTML Lint
|
- name: Run HTML Lint
|
||||||
run: bun run lint:html
|
run: bun run lint:html
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue