Skip to content

Conversation

@VAIBHAVSING
Copy link
Owner

Summary

Add GitHub Actions workflow to automatically publish DevContainer features to GitHub Container Registry (GHCR).

What this adds

Workflow Features

  • Automatic Publishing: Triggers on push to main or manual dispatch
  • Multi-Architecture: Supports both amd64 and arm64
  • Version Management: Extracts version from devcontainer-feature.json
  • OCI Artifacts: Proper OCI artifact creation for DevContainer features
  • Usage Instructions: Auto-generates usage documentation
  • Matrix Strategy: Publishes all features in parallel

Published Features

The workflow publishes three features to GHCR:

  1. supervisor - Workspace monitoring and backups
  2. claude-cli - Anthropic Claude CLI
  3. ai-tools - Comprehensive AI development tools bundle

Registry Location

Features are published to:

ghcr.io/vaibhavsing/dev8.dev/devcontainer-features/{feature-name}:{version}

Usage Example

After publishing, users can reference features in their .devcontainer/devcontainer.json:

{
  "image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
  "features": {
    "ghcr.io/vaibhavsing/dev8.dev/devcontainer-features/supervisor:1": {
      "version": "latest"
    },
    "ghcr.io/vaibhavsing/dev8.dev/devcontainer-features/claude-cli:1": {
      "installShellCompletion": true
    },
    "ghcr.io/vaibhavsing/dev8.dev/devcontainer-features/ai-tools:1": {
      "installGithubCLI": true,
      "installCopilot": true,
      "setupShellAliases": true
    }
  }
}

Workflow Triggers

  • Push to main: Auto-publishes when feature files change
  • Release: Publishes on GitHub releases
  • Manual: Can be triggered via workflow_dispatch

Permissions

Requires:

  • contents: read - To checkout repository
  • packages: write - To publish to GHCR

Workflow Steps

  1. Checkout: Clone the repository
  2. Login: Authenticate to GHCR using GITHUB_TOKEN
  3. Metadata: Extract version and description from feature files
  4. Tarball: Create feature tarball with all necessary files
  5. OCI Build: Build multi-arch OCI artifact
  6. Push: Push to GHCR with version and latest tags
  7. Docs: Generate usage instructions
  8. Summary: Create workflow summary

Benefits

  • Automated Distribution: No manual publishing steps
  • Version Control: Versions tracked in feature JSON files
  • Multi-Platform: Works on both AMD64 and ARM64
  • Documentation: Auto-generated usage instructions
  • Reliability: Uses official GitHub Actions

Integration

This workflow complements the feature implementation PRs:

Testing

To test locally:

# Manually trigger workflow
gh workflow run publish-devcontainer-features.yml

# Check workflow status
gh run list --workflow=publish-devcontainer-features.yml

# View packages
gh api /user/packages/container/devcontainer-features%2Fsupervisor

Future Enhancements

  • Automated testing of features before publishing
  • Release notes generation
  • Feature deprecation notices
  • Version compatibility matrix
  • Integration with DevContainer feature registry

Add GitHub Actions workflow to automatically publish DevContainer
features to GitHub Container Registry.

Features:
- Automatic publishing on push to main or manual trigger
- Multi-architecture support (amd64, arm64)
- Version tagging from devcontainer-feature.json
- OCI artifact creation for features
- Usage instructions generation
- Summary output for easy reference

Published features:
- supervisor (workspace monitoring)
- claude-cli (AI CLI)
- ai-tools (comprehensive dev tools bundle)

Features are published to:
ghcr.io/dev8-community/devcontainer-features/{feature-name}:version
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 14, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/publish-devcontainer-features-workflow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants