1 Commits

Author SHA1 Message Date
Danny Kim 7bae0d7237 Centralize encrypted bot profiles
Check / deno (pull_request) Successful in 36s
2026-09-24 05:00:02 +09:00
17 changed files with 8 additions and 10 deletions
+1 -1
View File
@@ -17,5 +17,5 @@ jobs:
- run: >- - run: >-
deno fmt --check . && deno fmt --check . &&
deno lint . && deno lint . &&
deno check src/prepare.ts src/run.ts src/post.ts && deno check prepare.ts run.ts post.ts &&
deno test --allow-all deno test --allow-all
+5 -7
View File
@@ -29,10 +29,8 @@ runs:
RUNNER_TEMP: ${{ runner.temp }} RUNNER_TEMP: ${{ runner.temp }}
run: | run: |
path=$(mktemp -d "${RUNNER_TEMP}/bot-agents-source-XXXXXX") path=$(mktemp -d "${RUNNER_TEMP}/bot-agents-source-XXXXXX")
mkdir "${path}/src" cp -a "${ACTION_PATH}"/*.ts "${ACTION_PATH}/profiles.yml" \
cp -a "${ACTION_PATH}"/src/*.ts "${path}/src/" "${ACTION_PATH}/prompt.md" "${path}/"
cp -a "${ACTION_PATH}/profiles.yml" "${ACTION_PATH}/prompt.md" \
"${path}/"
chmod -R go-w "${path}" chmod -R go-w "${path}"
echo "path=${path}" >> "${GITHUB_OUTPUT}" echo "path=${path}" >> "${GITHUB_OUTPUT}"
- name: Allow isolated profiles to edit the checkout - name: Allow isolated profiles to edit the checkout
@@ -41,7 +39,7 @@ runs:
- name: Prepare credentials - name: Prepare credentials
id: prepare id: prepare
shell: bash shell: bash
run: deno run -A "${{ steps.source.outputs.path }}/src/prepare.ts" run: deno run -A "${{ steps.source.outputs.path }}/prepare.ts"
env: env:
ACTION_PATH: ${{ steps.source.outputs.path }} ACTION_PATH: ${{ steps.source.outputs.path }}
BOT_AGENTS_MASTER_KEY: ${{ inputs.master-key }} BOT_AGENTS_MASTER_KEY: ${{ inputs.master-key }}
@@ -49,7 +47,7 @@ runs:
- name: Run bot - name: Run bot
id: agent id: agent
shell: bash shell: bash
run: deno run -A "${{ steps.source.outputs.path }}/src/run.ts" run: deno run -A "${{ steps.source.outputs.path }}/run.ts"
env: env:
BOT_AGENTS_MANIFEST: ${{ steps.prepare.outputs.manifest }} BOT_AGENTS_MANIFEST: ${{ steps.prepare.outputs.manifest }}
GITEA_TOKEN: ${{ gitea.token }} GITEA_TOKEN: ${{ gitea.token }}
@@ -62,7 +60,7 @@ runs:
id: post id: post
if: always() && steps.prepare.outputs.manifest != '' if: always() && steps.prepare.outputs.manifest != ''
shell: bash shell: bash
run: deno run -A "${{ steps.source.outputs.path }}/src/post.ts" run: deno run -A "${{ steps.source.outputs.path }}/post.ts"
env: env:
BOT_AGENTS_MANIFEST: ${{ steps.prepare.outputs.manifest }} BOT_AGENTS_MANIFEST: ${{ steps.prepare.outputs.manifest }}
GITEA_API_URL: ${{ gitea.api_url }} GITEA_API_URL: ${{ gitea.api_url }}
View File
View File
View File
View File
View File
View File
View File
View File
View File
+2 -2
View File
@@ -96,14 +96,14 @@ Deno.test("CI checks every phase and the root isolation suite", async () => {
const commands = sequence(job.steps, "jobs.deno.steps") const commands = sequence(job.steps, "jobs.deno.steps")
.map((step) => typeof step.run === "string" ? step.run : "") .map((step) => typeof step.run === "string" ? step.run : "")
.join("\n"); .join("\n");
for (const entrypoint of ["src/prepare.ts", "src/run.ts", "src/post.ts"]) { for (const entrypoint of ["prepare.ts", "run.ts", "post.ts"]) {
assert(commands.includes(entrypoint), entrypoint); assert(commands.includes(entrypoint), entrypoint);
} }
assert(commands.includes("deno test --allow-all")); assert(commands.includes("deno test --allow-all"));
}); });
Deno.test("uses the standard Skills installer without custom discovery", async () => { Deno.test("uses the standard Skills installer without custom discovery", async () => {
const runner = await Deno.readTextFile("src/run.ts"); const runner = await Deno.readTextFile("run.ts");
assert(runner.includes("skills add obra/superpowers")); assert(runner.includes("skills add obra/superpowers"));
try { try {
await Deno.stat("superpowers.ts"); await Deno.stat("superpowers.ts");