mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Continuous Integration
|
|
|
|
on:
|
|
# Trigger the workflow on push or pull request or custom
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- '*.ts'
|
|
pull_request_target:
|
|
branches:
|
|
main
|
|
paths:
|
|
- '*ts'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
Prettier:
|
|
name: Run Prettier
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
|
with:
|
|
node-version: 17
|
|
|
|
- name: Install pnpm
|
|
run: npm i -g yarn
|
|
|
|
# Prettier must be in `package.json`
|
|
- name: Install Node.js dependencies
|
|
run: yarn --immutable
|
|
|
|
- name: Run Prettier
|
|
run: yarn pretty
|
|
|
|
- name: Create Pull Request
|
|
id: cpr
|
|
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # v4
|
|
with:
|
|
commit-message: "style: pretty please"
|
|
branch: prettier
|
|
delete-branch: true
|
|
branch-suffix: short-commit-hash
|
|
title: "style: pretty please"
|
|
body: "pretty pretty prettier"
|
|
reviewers: EvolutionX-10
|