Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GitHub Action to publish VM0 agent compose configurations

License

Notifications You must be signed in to change notification settings

vm0-ai/compose-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

VM0 Compose Action

A GitHub Action to publish VM0 agent compose configurations.

Usage

- name: Publish VM0 Agent
  uses: vm0-ai/compose-action@v1
  with:
    vm0-token: ${{ secrets.VM0_TOKEN }}

Inputs

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

Outputs

Output Description
compose-id The compose ID
version-id The version ID (short hash)
name The agent name
action Action taken (created or updated)

Examples

Auto-publish on Push

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 }}

Custom Config File Path

- name: Publish VM0 Agent
  uses: vm0-ai/compose-action@v1
  with:
    config-file: agents/my-agent/vm0.yaml
    vm0-token: ${{ secrets.VM0_TOKEN }}

Custom Working Directory

- name: Publish VM0 Agent
  uses: vm0-ai/compose-action@v1
  with:
    working-directory: packages/my-agent
    vm0-token: ${{ secrets.VM0_TOKEN }}

Using Outputs

- 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 }}"

Publish on Release

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 }}

Authentication

To use this action, you need a VM0 authentication token:

  1. Install the VM0 CLI: npm install -g @vm0/cli
  2. Login: vm0 auth login
  3. Export token: vm0 auth setup-token
  4. Add to GitHub Secrets as VM0_TOKEN
# Export token and add to GitHub secrets
vm0 auth setup-token | gh secret set VM0_TOKEN

License

MIT

About

GitHub Action to publish VM0 agent compose configurations

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors