mirror of
https://github.com/ivuorinen/actions.git
synced 2026-01-26 11:34:00 +00:00
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
39 lines
938 B
YAML
39 lines
938 B
YAML
---
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
|
|
name: Prettier Fix
|
|
description: Run Prettier to fix code style violations
|
|
author: 'Ismo Vuorinen'
|
|
|
|
branding:
|
|
icon: 'code'
|
|
color: 'blue'
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Set Git Config
|
|
uses: ivuorinen/actions/set-git-config@main
|
|
|
|
- name: Node Setup
|
|
uses: ivuorinen/actions/node-setup@main
|
|
|
|
- name: Install Dependencies
|
|
shell: bash
|
|
run: |
|
|
npm install
|
|
|
|
- name: Run Prettier Fix
|
|
shell: bash
|
|
run: |
|
|
npx prettier --write .
|
|
|
|
- name: Push Fixes
|
|
if: always()
|
|
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0
|
|
with:
|
|
commit_message: 'style: autofix Prettier violations'
|
|
add_options: '-u'
|