Skip to content

Commit

Permalink
chore: Add Update CSpell workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Jul 30, 2024
1 parent de94a3f commit 8e61076
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/update-cspell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: ' 🔗 Update CSpell'

on:
push:
branches:
- main
paths:
- '**/package.json'
- '**/package-lock.json'
workflow_dispatch:
inputs:
base:
description: The Base Ref to apply the diff
required: false
default: 'main'
schedule:
- cron: '0 12 * * 0'

env:
NEW_BRANCH: "update-cspell-${{ inputs.base || 'main' }}"
REF_BRANCH: ${{ inputs.base || 'main' }}

jobs:
update-dependencies:
if: github.repository_owner == 'streetsidesoftware'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ env.REF_BRANCH }}
- name: Info
run: |
npm -v
node -v
- name: Update
run: |
npm i
npm run build
npm run build:readme
npm run lint
npm run update-cspell
npm i
- name: GenBody
id: body
uses: streetsidesoftware/actions/public/pr-body@v1
with:
title: Update ALL Dependencies
path: package.json

- name: PR
uses: ./.github/actions/pr
with:
commit-message: 'ci: Update CSpell'
branch: ${{ env.NEW_BRANCH }}
base: ${{ env.REF_BRANCH }}
title: 'fix: Update CSpell (${{ env.REF_BRANCH }})'
body: ${{ steps.body.outputs.body }}
app_id: ${{ secrets.AUTOMATION_APP_ID }}
app_private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3995,6 +3995,7 @@
"lint-docs-ci": "prettier -c \"docs/**/*.{md,markdown,yaml,yml,json,html,htm,js,ts}\"",
"test-client-integration": "npm --workspace=@internal/integration-tests run test-integration",
"test": "npm --workspaces --if-present run test && echo OK",
"update-cspell": "npx npm-check-updates --root -ws --target semver -u \"cspell*\" \"@cspell/*\" && npm i",
"update-packages": "npm run update:packages:root && npm run update:packages:website",
"update:packages:root": "npx npm-check-updates --root -ws --target semver -u && npm i",
"update:packages:website": "cd website && npm run update-packages",
Expand Down

0 comments on commit 8e61076

Please sign in to comment.