Repository navigation
XCL-195 agent-dev-kit の新しい版で、apm.yml のスキルの版を上げる PR を作る - #6
Merged
Merged
Conversation
# Conflicts: # README.md # docs/SETUP.md
# Conflicts: # README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
再利用ワークフローとアクションの SHA は Dependabot が上げるが、利用側の
apm.ymlの kit のスキル (<kit>/skills/<name>#vX.Y.Z) は手でしか上がらない。kit に新しいタグが出たら、版を上げてapm installした PR を作る再利用ワークフローを足す (Dependabot の APM 版)。変更内容
.github/workflows/agent-apm-bump.yml(workflow_call): kit の最新のvX.Y.Zのタグを取り、apm.ymlを書き換え、APM の公式のアクション (microsoft/apm-actionのsetup-only) で CLI を入れてapm installし、apm-bump/agent-dev-kitのブランチで PR を作る (既にあれば更新、変更がなければ何もしない)scripts/ci/apm-bump.mjs: 最新のタグの選び方とapm.ymlの書き換え。ワークフローは、呼ばれた kit の同じコミットからこれを取るscripts/ci/apm-bump.test.mjs: テストdocs/SETUP.md§4 に呼び出し側の例 (権限・スケジュール・token)、README.mdの表に 1 行受け入れ条件
.github/workflows/agent-apm-bump.yml(workflow_call) がある。利用側は、定期 (schedule) と手動で呼ぶvX.Y.Z) を取り、利用側のapm.ymlのagent-dev-kit/skills/...#v...を、それより古ければ上げるapm installを実行し、apm.lock.yamlを更新するapm-bump/agent-dev-kit) で PR を作るか、既にあれば更新する。変更がなければ何もしないdocs/SETUP.mdに、呼び出し側の例 (権限、スケジュール) を書く。README.mdの表に足す動作確認
node --test 'scripts/ci/*.test.mjs' 'ops/linear-janitor/*.test.mjs': 43 件すべて成功 (古い版は上がる、同じ版は変わらない、kit 以外は変わらない、#main・#v1・版なし・SHA は変えない、タグが取れなければ何もせず失敗)docker run --rm -v "$PWD:/repo" -w /repo rhysd/actionlint:1.7.12 -ignore 'workflow_(repository|sha)': 指摘なしgit ls-remote→latest→bump→apm installを流し、#v1.2.0がv1.4.0になり、apm.lock.yamlのresolved_refがv1.4.0になることを確認リスクの確認
.env*、キー、トークン) を含めていない人が確認すること
workflow_dispatchから 1 回動かし、PR ができることを確かめてほしい補足
git ls-remoteで取れるvX.Y.Zのタグの最大にした。動くタグ (v1) と pre-release は見ないtokenに PAT か GitHub App の token を渡す (SETUP に記載)apm-versionを省略すると、利用側のapm.lock.yamlのapm_version(なければ0.38.0) の CLI を入れる。ロックを作った版と違う CLI で install して、ロックが書き換わるのを避けるため