Skip to content

Sync Schemes

Sync Schemes #18

Workflow file for this run

name: Sync Schemes
on:
# Run weekly on Wednesday at 03:47 UTC
schedule:
- cron: '47 3 * * 3'
# Allow manual trigger
workflow_dispatch:
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install
- name: Sync schemes
run: bun sync-schemes.ts
- name: Check for changes
id: changes
run: |
if git diff --quiet schemes.json; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push
if: steps.changes.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add schemes.json
git commit -m "chore: sync schemes from tinted-theming"
git push