mirror of
https://github.com/ivuorinen/actions.git
synced 2026-02-12 14:46:55 +00:00
feat: add GitHub Actions workflows for code quality and automation (#2)
This commit is contained in:
17
prettier-fix/README.md
Normal file
17
prettier-fix/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# ivuorinen/actions/prettier-fix
|
||||
|
||||
## Prettier Fix
|
||||
|
||||
### Description
|
||||
|
||||
Run Prettier to fix code style violations
|
||||
|
||||
### Runs
|
||||
|
||||
This action is a `composite` action.
|
||||
|
||||
### Usage
|
||||
|
||||
```yaml
|
||||
- uses: ivuorinen/actions/prettier-fix@main
|
||||
```
|
||||
38
prettier-fix/action.yml
Normal file
38
prettier-fix/action.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
# 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@v4
|
||||
|
||||
- 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@v5
|
||||
with:
|
||||
commit_message: 'style: autofix Prettier violations'
|
||||
add_options: '-u'
|
||||
Reference in New Issue
Block a user