ci: add in markdown embedder
All checks were successful
Dependabot Auto-Merge / dependabot (pull_request) Has been skipped
Dependabot Auto-Merge / devopsbot (pull_request) Has been skipped
Dependabot Auto-Merge / rennovatebot (pull_request) Has been skipped
Unit Tests / unittest (pull_request) Successful in 4s
COMMIT LINT / commitlint (pull_request) Successful in 26s
All checks were successful
Dependabot Auto-Merge / dependabot (pull_request) Has been skipped
Dependabot Auto-Merge / devopsbot (pull_request) Has been skipped
Dependabot Auto-Merge / rennovatebot (pull_request) Has been skipped
Unit Tests / unittest (pull_request) Successful in 4s
COMMIT LINT / commitlint (pull_request) Successful in 26s
This commit is contained in:
20
.github/workflows/agent-markdown.yml
vendored
Normal file
20
.github/workflows/agent-markdown.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Markdown Embedder
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
embed-markdown:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Send task to coding agent
|
||||
uses: git.yusufali.ca/automation/action@main
|
||||
with:
|
||||
api_url: ${{ secrets.AGENT_API_URL }} # default: https://api.servc.io
|
||||
api_token: ${{ secrets.AGENT_TOKEN }} # optional, required for authenticated API calls
|
||||
route: agent-lake # default: agent-lake
|
||||
debug: false
|
||||
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -1,9 +1,7 @@
|
||||
name: 'Unit Tests'
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -20,4 +18,3 @@ jobs:
|
||||
uses: ./
|
||||
with:
|
||||
debug: 'true'
|
||||
route: 'random'
|
||||
2
dist/index.js
vendored
2
dist/index.js
vendored
@@ -32907,7 +32907,7 @@ for (const file of markdownFiles) {
|
||||
`Agent API request failed (${response.status}): ${responseText}`,
|
||||
);
|
||||
} else {
|
||||
core.info(`Agent response: ${responseText}`);
|
||||
core.info(`Agent response: ${response.text()}`);
|
||||
}
|
||||
})
|
||||
.catch((error) => core.setFailed(`Error sending task to agent: ${error}`));
|
||||
|
||||
4
index.js
4
index.js
@@ -37,7 +37,7 @@ if (apiToken) {
|
||||
}
|
||||
|
||||
for (const file of markdownFiles) {
|
||||
const content = fs.readFileSync(file, "utf8");
|
||||
const content = fs.readFileSync(file, "utf8").trim();
|
||||
|
||||
const requestPayload = {
|
||||
type: "input",
|
||||
@@ -75,7 +75,7 @@ for (const file of markdownFiles) {
|
||||
`Agent API request failed (${response.status}): ${responseText}`,
|
||||
);
|
||||
} else {
|
||||
core.info(`Agent response: ${responseText}`);
|
||||
core.info(`Agent response: ${response.text()}`);
|
||||
}
|
||||
})
|
||||
.catch((error) => core.setFailed(`Error sending task to agent: ${error}`));
|
||||
|
||||
Reference in New Issue
Block a user