forked from monkeytypegame/monkeytype
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.24 KB
/
pretty-fix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Prettier Fix
on:
workflow_dispatch:
inputs:
reason:
description: "Reason for manually triggering this workflow"
required: false
schedule:
- cron: "0 0 * * 0"
jobs:
prettier-fix:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up date environment variables
run: |
echo "BRANCH_TITLE=pretty-fix-$(date +%s)" >> $GITHUB_ENV
echo "PR_TITLE=Prettier Fix - $(date)" >> $GITHUB_ENV
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18.19.1"
- name: Install dependencies
run: npm i [email protected] --save-dev --save-exact
- name: Pretty Check
run: npm run pretty-fix
- name: Create commits
id: commits
continue-on-error: true
run: |
git config user.name 'monkeytypegeorge'
git config user.email '[email protected]'
git add .
git commit -m 'refactor: run prettier'
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:
branch: ${{ env.BRANCH_TITLE }}
title: ${{ env.PR_TITLE }}
body: ${{ env.PR_TITLE }}