YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
ci(skills): open PR instead of pushing — GH_PAGES_TOKEN expired + main is protected
Louis Beaumont1ea7753bb1fd
diff --git a/.github/workflows/sync-skills.yml b/.github/workflows/sync-skills.ymlindex 5f0876e1c..879cb8384 100644--- a/.github/workflows/sync-skills.yml+++ b/.github/workflows/sync-skills.yml@@ -22,26 +22,14 @@ on:permissions:contents: write+ pull-requests: writejobs:sync:runs-on: ubuntu-latest- # Bail when this very job did the previous push — the marker in the- # commit subject is the cheapest loop guard. Belt-and-braces with- # the `git diff --quiet` check below: even if a future committer- # forgets the marker, an empty diff still skips the push.- if: ${{ !contains(github.event.head_commit.message, '[skill-sync]') }}steps:- name: Checkoutuses: actions/checkout@v4- with:- # PAT instead of GITHUB_TOKEN so the resulting push can- # traverse main's branch protection. Same secret the- # benchmark workflow uses for its auto-push.- token: ${{ secrets.GH_PAGES_TOKEN }}- # Need full history so the push isn't rejected as a shallow- # update by some protection rule configurations.- fetch-depth: 0- name: Mirror crates/screenpipe-core/assets/skills/ → .claude/skills/run: |@@ -62,15 +50,29 @@ jobs:rsync -a --delete "$skill_dir" "$dst/$name/"done- - name: Commit and push if changed- run: |- set -euo pipefail- git config user.name "github-actions[bot]"- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"- git add .claude/skills/- if git diff --cached --quiet; then- echo "skills already in sync — nothing to push"- exit 0- fi- git commit -m "chore(skills): sync .claude/skills/ from crates/screenpipe-core/assets/skills/ [skill-sync]"- git push+ # Open a PR rather than pushing direct to main. main is protection-+ # gated and bot tokens can't bypass — we tried that path and the+ # PAT pattern adds maintenance pain (PATs expire). A PR is robust+ # forever; merge is one click.+ - name: Open PR if skills changed+ uses: peter-evans/create-pull-request@v6+ with:+ token: ${{ secrets.GITHUB_TOKEN }}+ commit-message: "chore(skills): sync .claude/skills/ from crates assets"+ title: "chore(skills): sync .claude/skills/ from crates assets"+ body: |+ Auto-generated by `.github/workflows/sync-skills.yml`.++ Mirrors the canonical CLI-shipped skills under+ `crates/screenpipe-core/assets/skills/` into `.claude/skills/`+ so repo-resident agents see the same instructions users get+ from the CLI.++ Per-skill rsync, so the four repo-only skills (release,+ user-feedback, screenpipe-health, screenpipe-logs) are+ preserved.+ branch: ci/sync-skills+ # Reuse the same branch each time so re-runs update the open+ # PR instead of stacking duplicates.+ delete-branch: true+ base: main