Keeps COPR packages in sync with upstream GitHub releases — automatically.
COPR can rebuild a package on a cron schedule or when its own webhook is called, but it has no idea when an upstream project publishes a new GitHub release. This repository closes that gap.
A GitHub Actions workflow polls a short list of upstream projects. When it finds a version that has not been built in COPR yet, it calls the COPR package webhook to start a build — no polling loop on your side, no manual button pressing.
cron '17 * * * *' ──┐
manual dispatch ──┴──▶ check-releases.yml
│
▼
┌───────────────────────┐
│ for each app in │
│ apps.json │
└───────────┬───────────┘
│
┌──────────────────┴──────────────────┐
▼ ▼
GitHub API /releases/latest COPR API latest build
→ upstream tag → built version
└──────────────────┬──────────────────┘
▼
tag != state/ OR tag not in COPR build?
│
┌────────────┴────────────┐
yes no
│ │
▼ ▼
POST COPR webhook "no change"
update state/<app>.txt
│
▼
commit state/ back to the repo
The check is deliberately belt and braces:
state/<app>.txtremembers the last version we saw — cheap, but it can drift.- The COPR API tells us what is actually built.
Because both are consulted, a missed webhook, a lost state file, or a failed run is recovered automatically on the next pass. The state file is a hint; COPR is the source of truth.
| Path | Purpose |
|---|---|
.github/workflows/check-releases.yml |
The entire logic — schedule, polling, comparison, webhook call, state commit |
apps.json |
The watch list: upstream repo + the name used as the COPR package name |
state/<app>.txt |
Last upstream tag seen per application |
state/.last-check |
Timestamp of the last successful run (heartbeat) |
Add these under Settings → Secrets and variables → Actions:
| Secret | Description |
|---|---|
COPR_OWNER |
COPR account or group that owns the project |
COPR_PROJECT |
COPR project name |
COPR_WEBHOOKS |
JSON map of package name → webhook URL |
COPR_WEBHOOKS is a single-line JSON object:
{
"heroic-games-launcher": "https://copr.fedorainfracloud.org/webhooks/custom/0000/1111/heroic-games-launcher/",
"protonup-qt": "https://copr.fedorainfracloud.org/webhooks/custom/0000/1111/protonup-qt/",
"zen-browser": "https://copr.fedorainfracloud.org/webhooks/custom/0000/1111/zen-browser/"
}Each key must match the name field in apps.json and the package name in COPR.
- Create the package in your COPR project with the same name as in
apps.json. - Open the package settings in COPR and copy its custom webhook URL.
- Put that URL into
COPR_WEBHOOKSunder the matching key.
{ "name": "my-app", "repo": "owner/my-app" }name— COPR package name (also the state file name and webhook key).repo— GitHubowner/repowhose/releases/latestis polled.
If you leave state/my-app.txt out, the first run treats the app as never seen and triggers one build. To avoid that, create the file with the current tag:
echo "v1.2.3" > state/my-app.txt- Package exists in COPR with the right name
- Webhook URL copied from COPR
- Entry added to
apps.json - Key added to the
COPR_WEBHOOKSsecret -
state/<name>.txtcreated with the current tag (optional, prevents a duplicate build)
Actions → Check COPR versions and trigger builds → Run workflow
A manual run is also the quickest fix after a long pause: it re-checks every app and triggers anything that was missed.
- Unauthenticated GitHub API. The workflow calls
api.github.comwithout a token, which is limited to 60 requests per hour per IP. On shared runner IPs this can be exhausted; the run then logs a warning and skips the app. PassingGITHUB_TOKENraises the limit to 1000/hour. cronis best effort. GitHub does not guarantee hourly execution; in practice this repository runs roughly 4–6 times a day, so expect a few hours of latency between an upstream release and the rebuild.- Scheduled workflows can be paused. Long periods without human activity may cause GitHub to disable the schedule. If
state/.last-checklooks old, trigger a manual run and re-enable the workflow. - Version matching is a substring check. Very short tags (e.g.
1.2) could false-positive against a longer COPR version (e.g.1.22.3).
MIT © 2026 CairnCodeWorks