Skip to content

Sync CH5 Joins

Sync CH5 Joins #169

Workflow file for this run

name: Sync CH5 Joins
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
sync:
name: Sync reserved joins from upstream
permissions:
contents: write
actions: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: latest
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Sync
run: pnpm sync
- name: Check for changes
id: changes
run: |
if git diff --exit-code --quiet; then
echo "changed=false" >> $GITHUB_OUTPUT
echo "No changes detected. Joins are up to date."
else
echo "changed=true" >> $GITHUB_OUTPUT
echo "Changes detected:"
git diff --stat
fi
- name: Test
if: steps.changes.outputs.changed == 'true'
run: pnpm test
- 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 -A
git commit -m "feat: sync reserved joins from upstream"
git push
- name: Trigger CI
if: steps.changes.outputs.changed == 'true'
uses: actions/github-script@v7
with:
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'ci.yml',
ref: 'master',
});