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'
|
name: 'Unit Tests'
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
workflow_dispatch:
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -20,4 +18,3 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
debug: 'true'
|
debug: 'true'
|
||||||
route: 'random'
|
|
||||||
@@ -10,6 +10,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
embed-markdown:
|
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}`,
|
`Agent API request failed (${response.status}): ${responseText}`,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
core.info(`Agent response: ${responseText}`);
|
core.info(`Agent response: ${response.text()}`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => core.setFailed(`Error sending task to agent: ${error}`));
|
.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) {
|
for (const file of markdownFiles) {
|
||||||
const content = fs.readFileSync(file, "utf8");
|
const content = fs.readFileSync(file, "utf8").trim();
|
||||||
|
|
||||||
const requestPayload = {
|
const requestPayload = {
|
||||||
type: "input",
|
type: "input",
|
||||||
@@ -75,7 +75,7 @@ for (const file of markdownFiles) {
|
|||||||
`Agent API request failed (${response.status}): ${responseText}`,
|
`Agent API request failed (${response.status}): ${responseText}`,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
core.info(`Agent response: ${responseText}`);
|
core.info(`Agent response: ${response.text()}`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => core.setFailed(`Error sending task to agent: ${error}`));
|
.catch((error) => core.setFailed(`Error sending task to agent: ${error}`));
|
||||||
|
|||||||
Reference in New Issue
Block a user