A GitHub Action to publish VM0 agent compose configurations.
- name: Publish VM0 Agent
uses: vm0-ai/compose-action@v1
with:
vm0-token: ${{ secrets.VM0_TOKEN }}| Input | Required | Default | Description |
|---|---|---|---|
working-directory |
No | . |
Working directory for running the compose command |
config-file |
No | vm0.yaml |
Path to the vm0.yaml config file (relative to working-directory) |
vm0-token |
Yes | - | VM0 authentication token |
vm0-api-url |
No | https://www.vm0.ai |
VM0 API URL |
cli-version |
No | latest |
@vm0/cli version to install |
| Output | Description |
|---|---|
compose-id |
The compose ID |
version-id |
The version ID (short hash) |
name |
The agent name |
action |
Action taken (created or updated) |
name: Publish Agent
on:
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish VM0 Agent
uses: vm0-ai/compose-action@v1
with:
vm0-token: ${{ secrets.VM0_TOKEN }}- name: Publish VM0 Agent
uses: vm0-ai/compose-action@v1
with:
config-file: agents/my-agent/vm0.yaml
vm0-token: ${{ secrets.VM0_TOKEN }}- name: Publish VM0 Agent
uses: vm0-ai/compose-action@v1
with:
working-directory: packages/my-agent
vm0-token: ${{ secrets.VM0_TOKEN }}- name: Publish VM0 Agent
id: publish
uses: vm0-ai/compose-action@v1
with:
vm0-token: ${{ secrets.VM0_TOKEN }}
- name: Print Results
run: |
echo "Agent: ${{ steps.publish.outputs.name }}"
echo "Compose ID: ${{ steps.publish.outputs.compose-id }}"
echo "Version: ${{ steps.publish.outputs.version-id }}"
echo "Action: ${{ steps.publish.outputs.action }}"name: Publish Agent on Release
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish VM0 Agent
uses: vm0-ai/compose-action@v1
with:
vm0-token: ${{ secrets.VM0_TOKEN }}To use this action, you need a VM0 authentication token:
- Install the VM0 CLI:
npm install -g @vm0/cli - Login:
vm0 auth login - Export token:
vm0 auth setup-token - Add to GitHub Secrets as
VM0_TOKEN
# Export token and add to GitHub secrets
vm0 auth setup-token | gh secret set VM0_TOKENMIT