Files
RSSHub/.github/workflows/format.yml
T
Tony 5326d9f751 chore(misc): multiple enhancement to github actions (#9000)
* chore: test workflow use redis

* chore: docker build cache sharing

* chore: eslint format yml files

* chore: nodemon restart on art template files changes

* chore: run test on multi node and os

* chore: unnecessary single version matrix build

* chore: fix container operations

Container operations are only supported on Linux runners

* chore: fix gha syntax

* chore: fix node version not show up

* revert: "chore: test workflow use redis"

This reverts commit df818fd697.

* revert: "chore: fix container operations"

This reverts commit c949368aa7.

* revert: "chore: run test on multi node and os"

This reverts commit 6b1cfde579.

* chore: run test on multi node version
2022-02-06 01:36:14 +08:00

26 lines
687 B
YAML

name: format
on:
push:
branches:
- master
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- run: yarn install
- run: npm run format
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
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)