Skip to content
Open
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
38 changes: 38 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CodeQL

on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:

permissions:
actions: read
checks: write
contents: read
security-events: write

jobs:
analyze:
name: CodeQL Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language:
- typescript
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
config-file: .github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
source-root: src

- name: Autobuild
uses: github/codeql-action/autobuild@v4

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
29 changes: 29 additions & 0 deletions .github/workflows/dependency-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Dependency Audit

on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:

permissions:
contents: read

jobs:
audit:
name: npm audit (production, high+)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm

- name: Install Dependencies
run: npm ci

- name: npm audit (production, high+)
run: npm audit --omit=dev --audit-level=high
56 changes: 56 additions & 0 deletions .github/workflows/licensed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Licensed

on:
schedule:
- cron: '0 15 * * 0,3'
workflow_dispatch:

permissions:
contents: write

jobs:
licensed:
name: Check Licenses
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm

- name: Install Dependencies
run: npm ci

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby

- uses: licensee/setup-licensed@v1.3.2
with:
version: 4.x
github_token: ${{ secrets.GITHUB_TOKEN }}

- if: ${{ github.event_name == 'workflow_dispatch' }}
name: Update Licenses
run: licensed cache

- if: ${{ github.event_name == 'workflow_dispatch' }}
name: Commit Licenses
run: |
git config --local user.email "licensed-ci@users.noreply.github.com"
git config --local user.name "licensed-ci"
git add .
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Auto-update license files"
git push
fi

- name: Check Licenses
run: licensed status
103 changes: 0 additions & 103 deletions .github/workflows/npm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
push:
branches:
- main
schedule:
- cron: '31 7 * * 3'
workflow_dispatch:

permissions:
Expand All @@ -17,7 +15,6 @@ permissions:
jobs:
lint:
name: Format & Lint
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -40,7 +37,6 @@ jobs:

test:
name: Tests
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -60,7 +56,6 @@ jobs:

bundle:
name: Bundle & Check dist
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
needs: lint
steps:
Expand Down Expand Up @@ -99,101 +94,3 @@ jobs:
with:
name: dist
path: dist/

dependency-audit:
name: Dependency Audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm

- name: Install Dependencies
run: npm ci

- name: npm audit (production, high+)
run: npm audit --omit=dev --audit-level=high

analyze:
name: CodeQL Analyze
runs-on: ubuntu-latest
permissions:
actions: read
checks: write
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language:
- typescript
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
config-file: .github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
source-root: src

- name: Autobuild
uses: github/codeql-action/autobuild@v4

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4

licensed:
name: Check Licenses
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm

- name: Install Dependencies
run: npm ci

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby

- uses: licensee/setup-licensed@v1.3.2
with:
version: 4.x
github_token: ${{ secrets.GITHUB_TOKEN }}

- if: ${{ github.event_name == 'workflow_dispatch' }}
name: Update Licenses
run: licensed cache

- if: ${{ github.event_name == 'workflow_dispatch' }}
name: Commit Licenses
run: |
git config --local user.email "licensed-ci@users.noreply.github.com"
git config --local user.name "licensed-ci"
git add .
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Auto-update license files"
git push
fi

- name: Check Licenses
run: licensed status