mirror of
https://github.com/GithubOrgProjectPiza/api-client.git
synced 2026-09-04 08:36:07 +02:00
Initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# This workflow runs Prettier and formats all files
|
||||
|
||||
name: Format files using prettier
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
# Job to check the formatting
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Install prettier
|
||||
run: npm i -g prettier
|
||||
|
||||
- name: Format using prettier
|
||||
run: prettier -w .
|
||||
|
||||
- name: Make pull request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
commit-message: "[create-pull-request] push formatted files"
|
||||
delete-branch: true
|
||||
title: "Reformat files using prettier"
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# This workflow checks whether all files conform with the Prettier configuration
|
||||
|
||||
name: Check prettier formatting
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
# Job to check the formatting
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Install prettier
|
||||
run: npm i -g prettier
|
||||
|
||||
- name: Check formatting
|
||||
run: prettier -c .
|
||||
Reference in New Issue
Block a user