Gitea composite action that submits a source RPM to Fedora COPR,
watches the build, and dumps each chroot's builder-live.log into the
CI output as collapsible groups.
copr-cli build by itself only prints status transitions
(pending / importing / running / succeeded). When a build fails
you have to click through to the COPR web UI to see the actual log.
This action:
--nowait and captures the build ID.https://copr.fedorainfracloud.org/coprs/build/... link so you can follow live.copr-cli watch-build while polling COPR for
the build's actual state, so the job's verdict comes from the build rather
than from the health of a long-lived connection.builder-live.log via
copr-cli download-build and emits them as ::group:: blocks.COPR_WAIT_BUDGET whatever happens, so the step finishes
before a CI runner's step limit kills it.| Variable | Default | Purpose |
|---|---|---|
COPR_WAIT_BUDGET | 2700 | Seconds to wait for the build before returning. A build still running at expiry is reported as such and the step exits 0 — CI runners commonly kill a step long before a large build finishes. |
COPR_POLL_INTERVAL | 30 | Seconds between build-state polls. |
COPR_API_BASE | https://copr.fedorainfracloud.org | COPR instance queried for per-chroot state. |
The runner must already have:
copr-cli on PATH (provided by the copr-cli RPM on Fedora runners).grep -P (PCRE, default on Fedora).python3, used to read per-chroot state from COPR's API. Already a hard
dependency of copr-cli, so this adds nothing in practice.| Input | Required | Description |
|---|---|---|
project | yes | COPR project in the form <owner>/<project>, e.g. helexa/cortex. |
srpm | yes | Path or glob to the source RPM(s) to submit, e.g. *.src.rpm. |
copr-config | yes | Contents of ~/.config/copr. Fetch from https://copr.fedorainfracloud.org/api/ and store as a repo or org secret. |
jobs:
publish:
runs-on: fedora
steps:
- uses: actions/download-artifact@v3
with:
name: my-srpm
- name: Publish to COPR
uses: https://git.lair.cafe/actions/copr-publish@v1
with:
project: helexa/cortex
srpm: '*.src.rpm'
copr-config: ${{ secrets.COPR_CONFIG }}
Note the fully-qualified URL in uses: — the Gitea instance's
DEFAULT_ACTIONS_URL points at github.com, so internal actions must be
referenced by absolute URL.
Pin to a major version tag (@v1) for automatic patch/minor updates.
Pin to an exact tag (@v1.0.3) to freeze.
COPR_CONFIG[copr-cli] config block.COPR_CONFIG in the consuming repo
(or at org level to share across all org repos).30 activities
95a84e4 fix: require every chroot to succeed, and repair a stale timeout variable8fa9802 fix: wait for the build again now the runner reaper reads the job log95973e7 fix: stop waiting past the runner's step limit and calling it a failure0b23fc8 fix: stop waiting past the runner's step limit and calling it a failured690d5a fix: bound every copr-cli call so a hung request cannot stall the job5f27687 fix: emit a heartbeat while waiting so the step is not killed as idle3701a48 fix: take the build verdict from COPR, not from watch-build3ac41b5 docs: add CLAUDE.md with hosting, tagging, and testing contextffa66e6 fix: read gzipped builder-live.log when dumping chroot logs22e1ba3 feat: initial copr-publish composite action