mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 04:56:07 +00:00
60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
name: Linter
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
linter:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.x'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- uses: pnpm/action-setup@v3
|
|
with:
|
|
version: 8
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Run Biome
|
|
run: pnpm run lint
|
|
id: biome
|
|
|
|
- name: Commit and Push changes
|
|
run: |
|
|
git config --global user.name 'github-actions[bot]'
|
|
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
|
git add .
|
|
git commit -m "chore: apply formatting"
|
|
git fetch origin ${{ github.head_ref }}
|
|
git rebase origin/${{ github.head_ref }}
|
|
git push origin HEAD:${{ github.head_ref }} --force
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
continue-on-error: true
|
|
|
|
- name: Checkout PR branch
|
|
if: failure()
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: refs/pull/${{ github.event.number }}/merge
|
|
|
|
- name: Commit and Push PR changes
|
|
if: failure()
|
|
run: |
|
|
git config --global user.name 'github-actions[bot]'
|
|
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
|
git add .
|
|
git commit -m "chore: apply formatting"
|
|
git push origin HEAD:refs/pull/${{ github.event.number }}/head --force
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|