Merge pull request 'ci: add in markdown embedder' (#1) from ci into main
Some checks failed
Markdown Embedder / embed-markdown (push) Failing after 7s
Some checks failed
Markdown Embedder / embed-markdown (push) Failing after 7s
Reviewed-on: #1
This commit is contained in:
22
.github/workflows/agent-markdown.yml
vendored
Normal file
22
.github/workflows/agent-markdown.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Markdown Embedder
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.md'
|
||||
|
||||
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'
|
||||
@@ -10,6 +10,8 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
embed-markdown:
|
||||
|
||||
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