Skip to content

Commit aa7177b

Browse files
authored
Merge pull request #2 from runloopai/tode-rl-patch-1
Update API URL to use 'platform' instead of 'api'; Rebuilt to fix source-type error
2 parents ee762c0 + a4154f8 commit aa7177b

14 files changed

Lines changed: 51029 additions & 143 deletions

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Mark dist folder as generated
2+
dist/** linguist-generated=true

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ A GitHub Action to deploy agents to the [Runloop](https://runloop.ai) platform.
1818

1919
```yaml
2020
- name: Deploy agent
21-
uses: runloop/deploy-agent@v1
21+
uses: runloopai/deploy-agent@main
2222
with:
2323
api-key: ${{ secrets.RUNLOOP_API_KEY }}
2424
source-type: git
@@ -59,7 +59,7 @@ That's it! The action will automatically use your current repository and commit
5959

6060
```yaml
6161
- uses: actions/checkout@v4
62-
- uses: runloop/deploy-agent@v1
62+
- uses: runloopai/deploy-agent@main
6363
with:
6464
api-key: ${{ secrets.RUNLOOP_API_KEY }}
6565
source-type: git
@@ -80,7 +80,7 @@ jobs:
8080
runs-on: ubuntu-latest
8181
steps:
8282
- uses: actions/checkout@v4
83-
- uses: runloop/deploy-agent@v1
83+
- uses: runloopai/deploy-agent@main
8484
with:
8585
api-key: ${{ secrets.RUNLOOP_API_KEY }}
8686
source-type: git
@@ -101,7 +101,7 @@ Basic example:
101101
102102
# Then deploy it
103103
- name: Deploy agent
104-
uses: runloop/deploy-agent@v1
104+
uses: runloopai/deploy-agent@main
105105
with:
106106
api-key: ${{ secrets.RUNLOOP_API_KEY }}
107107
source-type: tar
@@ -119,7 +119,7 @@ You can also use `.tar` format or reference output from a previous step:
119119
make package
120120
echo "archive-path=dist/my-agent.tar.gz" >> $GITHUB_OUTPUT
121121
122-
- uses: runloop/deploy-agent@v1
122+
- uses: runloopai/deploy-agent@main
123123
with:
124124
api-key: ${{ secrets.RUNLOOP_API_KEY }}
125125
source-type: tar
@@ -129,7 +129,7 @@ You can also use `.tar` format or reference output from a previous step:
129129
### Single File
130130

131131
```yaml
132-
- uses: runloop/deploy-agent@v1
132+
- uses: runloopai/deploy-agent@main
133133
with:
134134
api-key: ${{ secrets.RUNLOOP_API_KEY }}
135135
source-type: file
@@ -158,13 +158,25 @@ Store your Runloop API key as a GitHub secret:
158158
pnpm install
159159
```
160160

161+
### Testing with act
162+
163+
You can test the action locally using [act](https://github.com/nektos/act):
164+
165+
```bash
166+
act -j deploy --secret RUNLOOP_API_KEY=your_api_key
167+
```
168+
161169
### Building
162170

171+
The action uses [@vercel/ncc](https://github.com/vercel/ncc) to bundle all dependencies into a single file.
172+
163173
```bash
164-
pnpm run build # Build TypeScript
174+
pnpm run build # Bundle with ncc (creates dist/index.js)
165175
pnpm run rebuild # Clean and build
166176
```
167177

178+
After building, commit the `dist/` folder as it's required for the action to run.
179+
168180
### Code Quality
169181

170182
```bash

action.yml

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -56,55 +56,13 @@ inputs:
5656
outputs:
5757
agent-id:
5858
description: 'The ID of the created agent (e.g., agt_xxxx)'
59-
value: ${{ steps.deploy-agent.outputs.agent-id }}
6059

6160
object-id:
6261
description: 'The ID of the uploaded object (if applicable, e.g., obj_xxxx)'
63-
value: ${{ steps.deploy-agent.outputs.object-id }}
6462

6563
agent-name:
6664
description: 'The final name of the created agent'
67-
value: ${{ steps.deploy-agent.outputs.agent-name }}
6865

6966
runs:
70-
using: 'composite'
71-
steps:
72-
- name: Setup Node.js
73-
uses: actions/setup-node@v4
74-
with:
75-
node-version: '20'
76-
77-
- name: Setup pnpm
78-
uses: pnpm/action-setup@v3
79-
with:
80-
version: 9
81-
82-
- name: Install dependencies
83-
shell: bash
84-
run: |
85-
cd ${{ github.action_path }}
86-
pnpm install --prod --frozen-lockfile
87-
88-
- name: Deploy agent
89-
id: deploy-agent
90-
shell: bash
91-
env:
92-
INPUT_API_KEY: ${{ inputs.api-key }}
93-
INPUT_SOURCE_TYPE: ${{ inputs.source-type }}
94-
INPUT_AGENT_NAME: ${{ inputs.agent-name }}
95-
INPUT_GIT_REPOSITORY: ${{ inputs.git-repository }}
96-
INPUT_GIT_REF: ${{ inputs.git-ref }}
97-
INPUT_PATH: ${{ inputs.path }}
98-
INPUT_SETUP_COMMANDS: ${{ inputs.setup-commands }}
99-
INPUT_IS_PUBLIC: ${{ inputs.is-public }}
100-
INPUT_API_URL: ${{ inputs.api-url }}
101-
INPUT_OBJECT_TTL_DAYS: ${{ inputs.object-ttl-days }}
102-
GITHUB_REPOSITORY: ${{ github.repository }}
103-
GITHUB_SHA: ${{ github.sha }}
104-
GITHUB_REF: ${{ github.ref }}
105-
GITHUB_REF_NAME: ${{ github.ref_name }}
106-
GITHUB_EVENT_NAME: ${{ github.event_name }}
107-
GITHUB_WORKSPACE: ${{ github.workspace }}
108-
run: |
109-
cd ${{ github.action_path }}
110-
node dist/index.js
67+
using: 'node20'
68+
main: 'dist/index.js'

0 commit comments

Comments
 (0)