Files
RSSHub/.github/workflows/format.yml
T
dependabot[bot] 9f791abda7 chore(deps): bump actions/setup-node from 3.0.0 to 3.1.0 (#9445)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-02 06:05:02 +08:00

27 lines
755 B
YAML

name: format
on:
push:
branches:
- master
jobs:
format:
name: Auto format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.1.0
with:
node-version: '14'
cache: 'yarn'
- run: yarn install
- 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)