Skip to content

Prettier Fix

Prettier Fix #121

Workflow file for this run

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@v4
with:
node-version: "18.20.4"
- name: Install dependencies
run: npm i prettier@2.5.1 --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 'monkeytypegeorge@gmail.com'
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 }}