Linting the main branch π #146
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
name: Lint | |
run-name: Linting the main branch π | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
lint_project: | |
timeout-minutes: 60 | |
runs-on: self-hosted | |
steps: | |
- run: echo "π The job is linting the project" | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: | | |
npm install -g pnpm | |
pnpm install | |
- name: Lint | |
run: | | |
cd apps/web | |
pnpm format | |
pnpm precommit | |
- name: commit | |
uses: EndBug/add-and-commit@v9 | |
id: commit | |
with: | |
default_author: github_actions | |
new_branch: ${{ github.run_id }} | |
- name: Create Pull Request | |
if: ${{ steps.commit.outputs.committed }} | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: "ci: lint" | |
base: main | |
branch: ${{ github.run_id }} | |
title: "ci: lint [auto]" | |
assignees: | | |
${{ github.actor }} | |
a0m0rajab | |