mirror of
https://github.com/Ryujinx/Ryujinx-Ldn-Website.git
synced 2024-12-23 03:55:38 +00:00
56cfe2c055
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
86 lines
2 KiB
YAML
86 lines
2 KiB
YAML
on:
|
|
push:
|
|
branches-ignore:
|
|
- "master"
|
|
- "dependabot/**"
|
|
paths-ignore:
|
|
- ".*"
|
|
- "README.md"
|
|
- "tsconfig.json"
|
|
- "nodemon.json"
|
|
|
|
permissions:
|
|
checks: write
|
|
contents: write
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
cache: "npm"
|
|
|
|
- name: Configure git
|
|
run: |
|
|
git config --global user.name github-actions[bot]
|
|
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run ESLint
|
|
run: node_modules/.bin/eslint --fix .
|
|
|
|
- name: Check if files have been modified
|
|
id: mod_check
|
|
run: |
|
|
[[ $(git status -s | wc -l) -le 1 ]] \
|
|
&& echo "is-dirty=false" >> "$GITHUB_OUTPUT" \
|
|
|| echo "is-dirty=true" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Commit and push changes
|
|
if: steps.mod_check.outputs.is-dirty == 'true'
|
|
run: |
|
|
git add .
|
|
git commit -m "Apply linter fixes"
|
|
git push
|
|
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
cache: "npm"
|
|
|
|
- name: Configure git
|
|
run: |
|
|
git config --global user.name github-actions[bot]
|
|
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run Prettier
|
|
run: node_modules/.bin/prettier -w .
|
|
|
|
- name: Check if files have been modified
|
|
id: mod_check
|
|
run: |
|
|
[[ $(git status -s | wc -l) -le 1 ]] \
|
|
&& echo "is-dirty=false" >> "$GITHUB_OUTPUT" \
|
|
|| echo "is-dirty=true" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Commit and push changes
|
|
if: steps.mod_check.outputs.is-dirty == 'true'
|
|
run: |
|
|
git add .
|
|
git commit -m "Apply prettier formatting"
|
|
git push
|