aRustyDev / aRustyDev/homebrew-tap

ci(automation): Add external repo watcher for formula updates

Open
#2 0 comments 0 reactions 1 assignee Claimed by @aRustyDev View on GitHub
ci enhancement
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Summary

Add GitHub Actions workflow to automatically detect new releases from external/third-party repositories and create PRs to update corresponding formulas.

## Problem

When packaging third-party tools (like `zed-prompts`), we need to manually check for new releases and update formulas. This is error-prone and can lead to stale formulas.

## Solution

Create a scheduled workflow that:
1. Checks watched external repos for new tags/releases via GitHub API
2. Compares with current formula version
3. Downloads new tarball and computes SHA256
4. Creates a PR with updated `url` and `sha256`

## Implementation

### Workflow: `.github/workflows/watch-external-repos.yml`

| Feature | Details |
|---------|---------|
| **Schedule** | Every 6 hours (cron) |
| **Manual Trigger** | `workflow_dispatch` with optional repo filter |
| **Configuration** | `WATCHED_REPOS` env var (owner/repo:formula-name format) |
| **Output** | Auto-generated PR with version bump |

### Configuration Format

```yaml
env:
WATCHED_REPOS: |
rubiojr/zed-prompts:zed-prompts
owner/another-repo:formula-name
```

## Tasks

- [x] Create workflow file
- [ ] Test workflow manually via `workflow_dispatch`
- [ ] Verify PR creation works correctly
- [ ] Document how to add new watched repos

## Related

- Depends on formula existing first (e.g., #1 for zed-prompts)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.