Skip to content

archyl-com/sync-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archyl Sync GitHub Action

Automatically sync your archyl.yaml architecture file with Archyl whenever it changes.

Usage

On push to main

name: Sync Architecture
on:
  push:
    branches: [main]
    paths: ['archyl.yaml']

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: archyl-com/actions/sync@v1
        with:
          api-key: ${{ secrets.ARCHYL_API_KEY }}
          project-id: 'your-project-uuid'

With custom file path

- uses: archyl-com/actions/sync@v1
  with:
    api-key: ${{ secrets.ARCHYL_API_KEY }}
    project-id: 'your-project-uuid'
    file: 'docs/archyl.yaml'

Monorepo with multiple projects

name: Sync Architecture
on:
  push:
    branches: [main]
    paths:
      - 'archyl.yaml'
      - 'services/*/archyl.yaml'

jobs:
  sync-main:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: archyl-com/actions/sync@v1
        with:
          api-key: ${{ secrets.ARCHYL_API_KEY }}
          project-id: 'your-project-uuid'

  sync-payments:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: archyl-com/actions/sync@v1
        with:
          api-key: ${{ secrets.ARCHYL_API_KEY }}
          project-id: 'payments-project-uuid'
          file: 'services/payments/archyl.yaml'

Using the summary output

- uses: archyl-com/actions/sync@v1
  id: sync
  with:
    api-key: ${{ secrets.ARCHYL_API_KEY }}
    project-id: 'your-project-uuid'

- run: echo "${{ steps.sync.outputs.summary }}"

Self-hosted Archyl

- uses: archyl-com/actions/sync@v1
  with:
    api-url: 'https://archyl.your-company.com'
    api-key: ${{ secrets.ARCHYL_API_KEY }}
    project-id: 'your-project-uuid'

Inputs

Input Required Default Description
api-key Yes Archyl API key with write scope
project-id Yes Archyl project UUID
api-url No https://api.archyl.com API base URL (for self-hosted)
file No archyl.yaml Path to the YAML file relative to repo root

Outputs

Output Description
systems-created Number of systems created
containers-created Number of containers created
components-created Number of components created
relationships-created Number of relationships created
summary Human-readable summary of the sync result

Alternative: curl

curl -X POST \
  -H "X-API-Key: $ARCHYL_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"content\": $(cat archyl.yaml | jq -Rs .)}" \
  https://api.archyl.com/api/v1/projects/$PROJECT_ID/dsl/ingest

About

Archyl GitHub Action — sync action

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors