-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(workflows): add new push checks workflow
A new workflow for push checks has been added, which includes several steps such as code checkout, pnpm installation, dependencies installation, and code formatting with Biome. Git auto commit function for lint fixes is also incorporated in the new workflow.
- Loading branch information
1 parent
52fcfcf
commit a07fc93
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: π Push Checks Workflow | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
checks: | ||
name: π«Έ Push Checks | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: π₯ Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: π¦ Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: π οΈ Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: current | ||
cache: "pnpm" | ||
|
||
- name: 𧩠Install dependencies | ||
run: pnpm install --frozen-lockfile --prod=false | ||
|
||
- name: π£ Retrieve Git REF | ||
run: echo "GIT_REF=$(git rev-parse origin/main)" >> $GITHUB_ENV | ||
|
||
- name: π Debug Git REF | ||
run: echo "${{ env.GIT_REF }}" | ||
|
||
- name: π Format code (with Biome) | ||
continue-on-error: true | ||
run: | | ||
pnpm exec biome check \ | ||
--apply \ | ||
--changed \ | ||
--since=${{ env.GIT_REF }} \ | ||
--formatter-enabled=true \ | ||
--linter-enabled=false \ | ||
--organize-imports-enabled=true \ | ||
--vcs-enabled=true \ | ||
--vcs-use-ignore-file=true \ | ||
--no-errors-on-unmatched \ | ||
--diagnostic-level=info \ | ||
--log-level=warn \ | ||
. | ||
- name: π¦ Git Auto Commit Lint fixes (with Biome) | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: "chore: lint code with Biome [skip ci]" |