Skip to content

Commit

Permalink
[ci] Automate the world (linting) (#322)
Browse files Browse the repository at this point in the history
* Add lint formatting

* Fix workflow install

* Apply suggestions from code review

Co-authored-by: Adam Matthiesen <[email protected]>

* delete workflow

* Add dispatch

* on pull request

* break stuff

* fix stuff

* [ci] lint

* maybe fix more stuff

* [ci] lint

* delagate my own work

* [ci] lint

* hyphens save lives

* delete tab

* [ci] lint

* restore the flow of time

---------

Co-authored-by: Adam Matthiesen <[email protected]>
Co-authored-by: TheOtterlord <[email protected]>
Co-authored-by: StudioCMS <[email protected]>
  • Loading branch information
4 people authored Oct 3, 2024
1 parent c5d9291 commit 3298209
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 20 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/biome-linting.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 'Format Code'

on:
workflow_dispatch:
push:
branches:
- main

permissions:
contents: write

jobs:
format:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
- name: Check out code using Git
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup PNPM
uses: pnpm/action-setup@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
cache: pnpm
- name: Install dependencies
run: pnpm ci:install
shell: bash

- name: Format code
run: pnpm run lint:fix
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[ci] lint'
branch: ${{ github.head_ref }}
commit_user_name: astrolicious
commit_user_email: [email protected]
commit_author: StudioCMS <[email protected]>

0 comments on commit 3298209

Please sign in to comment.