Skip to content

👷 Fix the auto-fix workflow #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .github/workflows/fix.yaml

This file was deleted.

73 changes: 70 additions & 3 deletions .github/workflows/node.js.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Node.js CI

on:
push:
branches: main
merge_group:
branches:
- main
pull_request:
branches: main
branches:
- main
push:
branches:
- main

jobs:
test:
Expand All @@ -22,3 +27,65 @@ jobs:
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- run: pnpm run build
- run: pnpm run lint

fix:
runs-on: ubuntu-latest

permissions:
contents: write

needs:
- test

if: failure() && github.event_name != 'merge_group' && github.actor != 'github-actions[bot]' && github.actor != 'nektos/act'

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 22

- run: |
pnpm install --fix-lockfile --no-frozen-lockfile
git add .
- id: commit-lockfile
uses: qoomon/actions--create-commit@v1
with:
message: |
📌 pnpm install --fix-lockfile

[dependabot skip]
skip-empty: true

- run: |
pnpm run format
git add .
- id: commit-format
uses: qoomon/actions--create-commit@v1
with:
message: |
🎨 pnpm run format

[dependabot skip]
skip-empty: true

- run: |
pnpm run lint:fix
git add .
- id: commit-lint
uses: qoomon/actions--create-commit@v1
with:
message: |
🚨 pnpm run lint:fix

[dependabot skip]
skip-empty: true

- if: steps.commit-lockfile.outputs.commit || steps.commit-format.outputs.commit || steps.commit-lint.outputs.commit
run: git push
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"format": "prettier --write .",
"lint": "markdownlint-cli2 \"**/*.md\" && prettier --check .",
"lint:fix": "markdownlint-cli2 \"**/*.md\" --fix; prettier --list-different --write .",
"write-translations": "docusaurus write-translations",
Expand Down