Skip to content

Commit

Permalink
Update GitHub template files
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 21, 2024
1 parent e02097a commit e1a718e
Showing 1 changed file with 26 additions and 32 deletions.
58 changes: 26 additions & 32 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
name: Format

name: autofix.ci
on:
pull_request:
push:
branches: [main]
permissions:
contents: read

jobs:
format:
autofix:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: |
- recursive: false
args: [--frozen-lockfile]
- args: [--global, prettier, sort-package-json]
- uses: actions/setup-node@v4

- name: Setup PNPM
uses: pnpm/action-setup@v3

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Sort package.json
run: find . -name "package.json" -not -path "*/node_modules/*" -exec sort-package-json {} \;
- name: Format with Prettier
run: pnpm prettier --write .
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.PUBLIC_GITHUB_TOKEN }}
commit-message: "[ci] format"
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: ci-format
delete-branch: true
title: "[ci] format"
body: "This PR was automatically created to sort package.json files in the repository using sort-package-json and to format the repository using prettier."
labels: 🤖 bot
assignees: trueberryless
draft: false

- name: Install Dependencies
run: pnpm i

- name: Run prettier
run: npx prettier --write .

# Optimize all PNGs with https://pngquant.org/
- run: sudo apt-get update && sudo apt-get install -y pngquant
- name: Run pngquant
run: |
shopt -s globstar
find . -name '*.png' -exec pngquant --ext .png --force 256 {} \;
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c

0 comments on commit e1a718e

Please sign in to comment.