mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Continuous Integration
|
|
|
|
on:
|
|
# Trigger the workflow on push or pull request or custom
|
|
push:
|
|
branches:
|
|
main
|
|
pull_request_target:
|
|
branches:
|
|
main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
Prettier:
|
|
name: Run Prettier
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
|
|
with:
|
|
node-version: 17
|
|
|
|
- name: infer source
|
|
run: source ~/.bashrc
|
|
|
|
- name: Install pnpm
|
|
run: npm i -g pnpm
|
|
|
|
- name: setup pnpm
|
|
run: pnpm setup
|
|
|
|
# Prettier must be in `package.json`
|
|
- name: Install Node.js dependencies
|
|
run: pnpm add -g prettier && pnpm i
|
|
|
|
- name: Run Prettier
|
|
run: prettier --write .
|
|
|
|
- name: Create Pull Request
|
|
id: cpr
|
|
uses: peter-evans/create-pull-request@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
|