Ga naar hoofdinhoud

Gids: Automatische Updates

Overzicht

De oh-my-agent GitHub Action (first-fluke/oma-update-action@v1) werkt automatisch de agent-skills van je project bij door oma update in CI uit te voeren. Het ondersteunt twee modi: een pull request aanmaken voor review, of direct committen naar een branch.


Snelle Setup

name: Update oh-my-agent

on:
schedule:
- cron: '0 9 * * 1' # Elke maandag om 9:00 UTC
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: first-fluke/oma-update-action@v1

Alle Action Invoer

InvoerTypeStandaardBeschrijving
modestring"pr""pr" maakt een pull request. "commit" pusht direct.
base-branchstring"main"Basisbranch voor de PR of directe commits.
forcestring"false"Overschrijft gebruikersaanpassingen (oma-config.yaml, mcp.json, stack/).
pr-titlestring"chore(deps): update oh-my-agent skills"Aangepaste PR-titel.
pr-labelsstring"dependencies,automated"Kommagescheiden labels voor de PR.
commit-messagestring"chore(deps): update oh-my-agent skills"Aangepast commitbericht.
tokenstring${{ github.token }}GitHub-token. Gebruik een PAT als de PR andere workflows moet triggeren.

Alle Action Uitvoer

UitvoerTypeBeschrijving
updatedstring"true" als er wijzigingen zijn na oma update.
versionstringDe oh-my-agent versie na de update.
pr-numberstringHet pull request-nummer (alleen in pr-modus).
pr-urlstringDe volledige URL van de PR (alleen in pr-modus).

Gedetailleerde Voorbeelden

Voorbeeld 1: Standaard PR-Modus

- uses: first-fluke/oma-update-action@v1
id: update
- name: Samenvatting
if: steps.update.outputs.updated == 'true'
run: echo "Bijgewerkt naar versie ${{ steps.update.outputs.version }}"

Voorbeeld 2: Directe Commit-Modus met PAT

- uses: first-fluke/oma-update-action@v1
with:
mode: commit
token: ${{ secrets.OH_MY_AGENT_PAT }}
base-branch: develop

Voorbeeld 3: Met Slack-Notificatie

- uses: first-fluke/oma-update-action@v1
id: update
- name: Slack Notificatie
if: steps.update.outputs.updated == 'true'
uses: slackapi/slack-github-action@v2
with:
webhook: ${{ secrets.SLACK_WEBHOOK }}
webhook-type: incoming-webhook
payload: |
{"text": "oh-my-agent bijgewerkt naar v${{ steps.update.outputs.version }}"}

Voorbeeld 4: Force-Modus

- uses: first-fluke/oma-update-action@v1
with:
force: 'true'
pr-title: "chore(deps): force-update oh-my-agent skills (reset configs)"

Waarschuwing: Force-modus overschrijft oma-config.yaml, mcp.json en stack/-directory's.


Hoe Het Onder de Motorkap Werkt

  1. Setup Bun — Installeert de Bun-runtime
  2. Installeer oh-my-agentbun install -g oh-my-agent
  3. Voer oma update uitoma update --ci (optioneel --force)
  4. Controleer wijzigingengit status --porcelain .agents/ .claude/
  5. PR- of commit-modus — Afhankelijk van mode-invoer

Wat oma update --ci intern doet: versie controleren, tarball downloaden, gebruikersbestanden behouden (tenzij --force), bestanden kopieren, symlinks vernieuwen.