Files
RSSHub/.github/workflows/format.yml
T
Henry Wang 2ccd6446af chore: bump pnpm lockfile (#15501)
* chore: bump pnpm lockfile

* chore: update Dockerfile pnpm version

* chore: add packageManager version

* chore: bump CI pnpm version

* Revert "chore: update Dockerfile pnpm version"

This reverts commit 6178d92e39b0166e3272e1598101f9c6abc49b24.

* fix: revert Dockerfile auto-format

---------
2024-05-08 00:53:52 +08:00

36 lines
932 B
YAML

name: Format
on:
push:
branches:
- master
permissions:
contents: read
jobs:
format:
permissions:
contents: write # for Git to git push
name: Auto format
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
- run: pnpm i
- run: npm run format
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git status
git diff-index --quiet HEAD || (git commit -m "style: auto format" -a --no-verify && git push "https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" HEAD:master)